FreeBSD Bugzilla – Attachment 34022 Details for
Bug 55445
[PATCH] off-by-one bug in example code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
chapter.sgml.patch
chapter.sgml.patch (text/plain), 635 bytes, created by
Rui Lopes
on 2003-08-10 14:20:09 UTC
(
hide
)
Description:
chapter.sgml.patch
Filename:
MIME Type:
Creator:
Rui Lopes
Created:
2003-08-10 14:20:09 UTC
Size:
635 bytes
patch
obsolete
>--- chapter.sgml.orig Sun Aug 10 13:51:37 2003 >+++ chapter.sgml Sun Aug 10 13:52:54 2003 >@@ -318,10 +318,10 @@ > int err = 0; > > /* Copy the string in from user memory to kernel memory */ >- err = copyin(uio->uio_iov->iov_base, echomsg->msg, MIN(uio->uio_iov->iov_len,BUFFERSIZE)); >+ err = copyin(uio->uio_iov->iov_base, echomsg->msg, MIN(uio->uio_iov->iov_len,BUFFERSIZE-1)); > > /* Now we need to null terminate */ >- *(echomsg->msg + MIN(uio->uio_iov->iov_len,BUFFERSIZE)) = 0; >+ *(echomsg->msg + MIN(uio->uio_iov->iov_len,BUFFERSIZE-1)) = 0; > /* Record the length */ > echomsg->len = MIN(uio->uio_iov->iov_len,BUFFERSIZE);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 55445
: 34022