[BACK]Return to rcs.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Diff for /src/usr.bin/cvs/rcs.c between version 1.319 and 1.320

version 1.319, 2019/06/28 13:35:00 version 1.320, 2020/10/19 19:51:20
Line 2183 
Line 2183 
         int kwtype;          int kwtype;
         u_int j, found;          u_int j, found;
         const u_char *c, *start, *fin, *end;          const u_char *c, *start, *fin, *end;
         char *kwstr;          char *kwstr, *rcsfile_basename;
         char expbuf[256], buf[256];          char expbuf[256], buf[256], path[PATH_MAX];
         size_t clen, kwlen, len, tlen;          size_t clen, kwlen, len, tlen;
   
         kwtype = 0;          kwtype = 0;
Line 2202 
Line 2202 
         /* Final character in buffer. */          /* Final character in buffer. */
         fin = c + len - 1;          fin = c + len - 1;
   
           if (strlcpy(path, rcsfile, sizeof(path)) >= sizeof(path))
                   fatal("rcs_kwexp_line: truncation");
           rcsfile_basename = basename(path);
   
         /*          /*
          * Keyword formats:           * Keyword formats:
          * $Keyword$           * $Keyword$
Line 2300 
Line 2304 
                 if (mode & RCS_KWEXP_VAL) {                  if (mode & RCS_KWEXP_VAL) {
                         if (kwtype & RCS_KW_RCSFILE) {                          if (kwtype & RCS_KW_RCSFILE) {
                                 if (!(kwtype & RCS_KW_FULLPATH))                                  if (!(kwtype & RCS_KW_FULLPATH))
                                         (void)strlcat(expbuf, basename(rcsfile),                                          (void)strlcat(expbuf, rcsfile_basename,
                                             sizeof(expbuf));                                              sizeof(expbuf));
                                 else                                  else
                                         (void)strlcat(expbuf, rcsfile,                                          (void)strlcat(expbuf, rcsfile,
Line 2376 
Line 2380 
                                 /* Log line */                                  /* Log line */
                                 if (!(kwtype & RCS_KW_FULLPATH))                                  if (!(kwtype & RCS_KW_FULLPATH))
                                         (void)strlcat(expbuf,                                          (void)strlcat(expbuf,
                                             basename(rcsfile), sizeof(expbuf));                                              rcsfile_basename, sizeof(expbuf));
                                 else                                  else
                                         (void)strlcat(expbuf, rcsfile,                                          (void)strlcat(expbuf, rcsfile,
                                             sizeof(expbuf));                                              sizeof(expbuf));

Legend:
Removed from v.1.319  
changed lines
  Added in v.1.320