bin/173008: catopen(3) uninitialized value in failed entries.
Zhihao Yuan
lichray at gmail.com
Wed Oct 24 01:40:01 UTC 2012
>Number: 173008
>Category: bin
>Synopsis: catopen(3) uninitialized value in failed entries.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 24 01:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Zhihao Yuan
>Release: FreeBSD 8.3-STABLE amd64
>Organization:
Northern Illinois University
>Environment:
System: FreeBSD elitebook.hp 8.3-STABLE FreeBSD 8.3-STABLE #4 r240363: Tue Sep 11 10:40:15 CDT 2012 lichray at elitebook.hp:/usr/obj/usr/src/sys/HOUKAGO amd64
>Description:
np->catd will be tested on line 340, but failed entries have uninitialized .catd.
Invalid read under valgrind.
BTW: Please take a look at standards/172805 also. I suggested some other changes relating to this module there.
>How-To-Repeat:
>Fix:
--- catclose_uinit.patch begins here ---
diff --git lib/libc/nls/msgcat.c lib/libc/nls/msgcat.c
index 44b1440..2859916 100644
--- lib/libc/nls/msgcat.c
+++ lib/libc/nls/msgcat.c
@@ -82,6 +82,7 @@ __FBSDID("$FreeBSD$");
if (np != NULL) { \
np->name = strdup(n); \
np->path = NULL; \
+ np->catd = NLERR; \
np->lang = (l == NULL) ? NULL : \
strdup(l); \
np->caterrno = e; \
--- catclose_uinit.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list