This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13179] New: netname2host() uses uninitialized memory
- From: "thomas.jarosch at intra2net dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Mon, 12 Sep 2011 10:11:58 +0000
- Subject: [Bug libc/13179] New: netname2host() uses uninitialized memory
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13179
Bug #: 13179
Summary: netname2host() uses uninitialized memory
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: thomas.jarosch@intra2net.com
Classification: Unclassified
Hello,
the file "sunrpc/netname.c" contains this function in git head:
----------------------------------------------
int
netname2host (const char netname[MAXNETNAMELEN + 1], char *hostname,
const int hostlen)
{
char *p1, *p2;
char buffer[MAXNETNAMELEN + 1];
p1 = strchr (buffer, '.');
...
----------------------------------------------
The "cppcheck" linter reports:
[sunrpc/netname.c:201]: (error) Uninitialized variable: buffer
-> The current code looks like a merge error/bogus to me.
Best regards,
Thomas Jarosch
--
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.