View | Details | Raw Unified | Return to bug 55445
Collapse All | Expand All

(-)chapter.sgml (-2 / +2 lines)
Lines 318-327 Link Here
318
  int err = 0;
318
  int err = 0;
319
319
320
  /* Copy the string in from user memory to kernel memory */
320
  /* Copy the string in from user memory to kernel memory */
321
  err = copyin(uio->uio_iov->iov_base, echomsg->msg, MIN(uio->uio_iov->iov_len,BUFFERSIZE));
321
  err = copyin(uio->uio_iov->iov_base, echomsg->msg, MIN(uio->uio_iov->iov_len,BUFFERSIZE-1));
322
322
323
  /* Now we need to null terminate */
323
  /* Now we need to null terminate */
324
  *(echomsg->msg + MIN(uio->uio_iov->iov_len,BUFFERSIZE)) = 0;
324
  *(echomsg->msg + MIN(uio->uio_iov->iov_len,BUFFERSIZE-1)) = 0;
325
  /* Record the length */
325
  /* Record the length */
326
  echomsg->len = MIN(uio->uio_iov->iov_len,BUFFERSIZE);
326
  echomsg->len = MIN(uio->uio_iov->iov_len,BUFFERSIZE);

Return to bug 55445