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

Diff for /src/usr.bin/ssh/Attic/tildexpand.c between version 1.8.2.5 and 1.9

version 1.8.2.5, 2001/09/27 00:15:43 version 1.9, 2000/12/19 23:17:59
Line 14 
Line 14 
 RCSID("$OpenBSD$");  RCSID("$OpenBSD$");
   
 #include "xmalloc.h"  #include "xmalloc.h"
 #include "log.h"  #include "ssh.h"
 #include "tildexpand.h"  
   
 /*  /*
  * Expands tildes in the file name.  Returns data allocated by xmalloc.   * Expands tildes in the file name.  Returns data allocated by xmalloc.
Line 67 
Line 66 
         if (len > MAXPATHLEN)          if (len > MAXPATHLEN)
                 fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1);                  fatal("Home directory too long (%d > %d", len-1, MAXPATHLEN-1);
         expanded = xmalloc(len);          expanded = xmalloc(len);
         snprintf(expanded, len, "%s%s%s", pw->pw_dir, strcmp(pw->pw_dir, "/") ? "/" : "", cp + 1);          snprintf(expanded, len, "%s/%s", pw->pw_dir, cp + 1);
         return expanded;          return expanded;
 }  }

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