[BACK]Return to getcwd.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/getcwd.c between version 1.8 and 1.9

version 1.8, 1998/02/02 02:41:23 version 1.9, 1998/02/02 23:33:44
Line 59  __RCSID("$NetBSD$");
Line 59  __RCSID("$NetBSD$");
   
 #ifdef __weak_alias  #ifdef __weak_alias
 __weak_alias(getcwd,_getcwd);  __weak_alias(getcwd,_getcwd);
   __weak_alias(realpath,_realpath);
 #endif  #endif
   
 static char *getcwd_physical __P((char *, size_t));  static char *getcwd_physical __P((char *, size_t));
Line 170  loop:
Line 171  loop:
          * Save the last component name and get the full pathname of           * Save the last component name and get the full pathname of
          * the current directory.           * the current directory.
          */           */
         (void)strcpy(wbuf, p);          (void)strncpy(wbuf, p, (sizeof(wbuf) - 1));
   
         /*          /*
          * Call the inernal internal version of getcwd which           * Call the inernal internal version of getcwd which
Line 194  loop:
Line 195  loop:
                         goto err1;                          goto err1;
                 }                  }
                 if (rootd == 0)                  if (rootd == 0)
                         (void)strcat(resolved, "/");                          (void)strcat(resolved, "/"); /* XXX: strcat is safe */
                 (void)strcat(resolved, wbuf);                  (void)strcat(resolved, wbuf);   /* XXX: strcat is safe */
         }          }
   
         /* Go back to where we came from. */          /* Go back to where we came from. */

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

CVSweb <webmaster@jp.NetBSD.org>