This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12782] POSIX strerror_r quality of implementation
- From: "bruno at clisp dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sat, 21 May 2011 17:21:39 +0000
- Subject: [Bug libc/12782] POSIX strerror_r quality of implementation
- Auto-submitted: auto-generated
- References: <bug-12782-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12782
Bruno Haible <bruno at clisp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bruno at clisp dot org
--- Comment #3 from Bruno Haible <bruno at clisp dot org> 2011-05-21 17:21:18 UTC ---
The new code at
http://sourceware.org/git/?p=glibc.git;a=blob;f=string/xpg-strerror.c;h=00256c3dac2591e99b504c97b05945e27aefecce;hb=7ea72f99966a65a56aedba817ee2413ff9b1f23c
has three flaws:
- It overwrites buf[0] when buflen == 0. This is an out-of-bounds access.
- If errnum is invalid, it wastes time calling __strerror_r and strlen
before then returning EINVAL and ignoring the result of __strerror_r.
- It includes <libintl.h> and <locale.h> and defines dgettext(), although
these are not needed any more, because the localization is now done by
__strerror_r.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.