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

Diff for /src/usr.bin/rcs/rlog.c between version 1.74 and 1.75

version 1.74, 2016/10/16 13:35:51 version 1.75, 2020/10/15 19:47:46
Line 28 
Line 28 
 #include <ctype.h>  #include <ctype.h>
 #include <err.h>  #include <err.h>
 #include <libgen.h>  #include <libgen.h>
   #include <limits.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
Line 348 
Line 349 
 static void  static void
 rlog_file(const char *fname, RCSFILE *file)  rlog_file(const char *fname, RCSFILE *file)
 {  {
         char numb[RCS_REV_BUFSZ];          char fnamebuf[PATH_MAX], numb[RCS_REV_BUFSZ];
         u_int nrev;          u_int nrev;
         struct rcs_sym *sym;          struct rcs_sym *sym;
         struct rcs_access *acp;          struct rcs_access *acp;
Line 364 
Line 365 
         } else          } else
                 nrev = file->rf_ndelta;                  nrev = file->rf_ndelta;
   
         if ((workfile = basename(fname)) == NULL)          if (strlcpy(fnamebuf, fname, sizeof(fnamebuf)) >= sizeof(fnamebuf))
                   errx(1, "rlog_file: truncation");
   
           if ((workfile = basename(fnamebuf)) == NULL)
                 err(1, "basename");                  err(1, "basename");
   
         /*          /*

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.75