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

Diff for /src/usr.bin/ar/Attic/ar.c between version 1.8 and 1.9

version 1.8, 2002/12/11 22:01:13 version 1.9, 2003/04/04 22:12:08
Line 94 
Line 94 
          * Fix it, if necessary.           * Fix it, if necessary.
         */          */
         if (*argv[1] != '-') {          if (*argv[1] != '-') {
                 if (!(p = malloc((u_int)(strlen(argv[1]) + 2))))                  size_t len;
   
                   len = (u_int)(strlen(argv[1]) + 2);
                   if (!(p = malloc(len)))
                         err(1, NULL);                          err(1, NULL);
                 *p = '-';                  *p = '-';
                 (void)strcpy(p + 1, argv[1]);   /* ok */                  (void)strlcpy(p + 1, argv[1], len - 1);
                 argv[1] = p;                  argv[1] = p;
         }          }
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9