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

Diff for /src/usr.bin/ssh/atomicio.c between version 1.27 and 1.28

version 1.27, 2015/01/16 06:40:12 version 1.28, 2016/07/27 23:18:12
Line 94 
Line 94 
         struct iovec iov_array[IOV_MAX], *iov = iov_array;          struct iovec iov_array[IOV_MAX], *iov = iov_array;
         struct pollfd pfd;          struct pollfd pfd;
   
         if (iovcnt > IOV_MAX) {          if (iovcnt < 0 || iovcnt > IOV_MAX) {
                 errno = EINVAL;                  errno = EINVAL;
                 return 0;                  return 0;
         }          }
         /* Make a copy of the iov array because we may modify it below */          /* Make a copy of the iov array because we may modify it below */
         memcpy(iov, _iov, iovcnt * sizeof(*_iov));          memcpy(iov, _iov, (size_t)iovcnt * sizeof(*_iov));
   
         pfd.fd = fd;          pfd.fd = fd;
         pfd.events = f == readv ? POLLIN : POLLOUT;          pfd.events = f == readv ? POLLIN : POLLOUT;

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28