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

Diff for /src/usr.bin/cvs/client.c between version 1.116 and 1.117

version 1.116, 2008/06/14 03:19:15 version 1.117, 2009/02/13 20:50:15
Line 686 
Line 686 
         struct timeval tv[2];          struct timeval tv[2];
         char repo[MAXPATHLEN], *entry;          char repo[MAXPATHLEN], *entry;
         char timebuf[CVS_TIME_BUFSZ], revbuf[CVS_REV_BUFSZ];          char timebuf[CVS_TIME_BUFSZ], revbuf[CVS_REV_BUFSZ];
         char *en, *mode, *len, *rpath;          char *en, *mode, *len, *rpath, *p;
         char sticky[CVS_ENT_MAXLINELEN], fpath[MAXPATHLEN];          char sticky[CVS_ENT_MAXLINELEN], fpath[MAXPATHLEN];
   
         if (data == NULL)          if (data == NULL)
Line 705 
Line 705 
         if (strlen(repo) + 1 > strlen(rpath))          if (strlen(repo) + 1 > strlen(rpath))
                 fatal("received a repository path that is too short");                  fatal("received a repository path that is too short");
   
         (void)xsnprintf(fpath, sizeof(fpath), "%s/%s", data,          p = strrchr(rpath, '/');
             strrchr(rpath, '/'));          if (p == NULL)
                   fatal("malicious repository path from server");
   
           (void)xsnprintf(fpath, sizeof(fpath), "%s/%s", data, p);
   
         flen = strtonum(len, 0, INT_MAX, &errstr);          flen = strtonum(len, 0, INT_MAX, &errstr);
         if (errstr != NULL)          if (errstr != NULL)

Legend:
Removed from v.1.116  
changed lines
  Added in v.1.117