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

Diff for /src/usr.bin/cvs/update.c between version 1.173 and 1.174

version 1.173, 2016/10/14 20:37:07 version 1.174, 2016/10/15 22:20:17
Line 259 
Line 259 
         if (fstat(cf->fd, &st) == -1)          if (fstat(cf->fd, &st) == -1)
                 fatal("cvs_update_leavedir: %s", strerror(errno));                  fatal("cvs_update_leavedir: %s", strerror(errno));
   
         bufsize = st.st_size;          if ((uintmax_t)st.st_size > SIZE_MAX)
         if (bufsize < st.st_blksize)  
                 bufsize = st.st_blksize;  
   
         if (st.st_size > SIZE_MAX)  
                 fatal("cvs_update_leavedir: %s: file size too big",                  fatal("cvs_update_leavedir: %s: file size too big",
                     cf->file_name);                      cf->file_name);
   
           bufsize = (st.st_size > st.st_blksize) ? st.st_size : st.st_blksize;
   
         isempty = 1;          isempty = 1;
         buf = xmalloc(bufsize);          buf = xmalloc(bufsize);

Legend:
Removed from v.1.173  
changed lines
  Added in v.1.174