FreeBSD Bugzilla – Attachment 11848 Details for
Bug 23150
sscanf is used on a buffer that is not NULL-terminated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 739 bytes, created by
Dan Nelson (old address)
on 2000-11-28 07:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Dan Nelson (old address)
Created:
2000-11-28 07:20:00 UTC
Size:
739 bytes
patch
obsolete
>Index: elfcore.c >=================================================================== >RCS file: /home/ncvs/src/usr.bin/gcore/elfcore.c,v >retrieving revision 1.6 >diff -b -u -p -r1.6 elfcore.c >--- elfcore.c 2000/04/18 02:39:25 1.6 >+++ elfcore.c 2000/11/28 07:08:24 >@@ -455,7 +455,7 @@ readmap(pid_t pid) > bufsize = 8 * 1024; > mapbuf = NULL; > for ( ; ; ) { >- if ((mapbuf = realloc(mapbuf, bufsize)) == NULL) >+ if ((mapbuf = realloc(mapbuf, bufsize + 1)) == NULL) > errx(1, "out of memory"); > mapsize = read(mapfd, mapbuf, bufsize); > if (mapsize != -1 || errno != EFBIG) >@@ -470,6 +470,7 @@ readmap(pid_t pid) > errx(1, "empty map file %s", mapname); > close(mapfd); > >+ mapbuf[mapsize] = 0; > pos = 0; > map = NULL; > linkp = ↦
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 23150
: 11848