This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13179] New: netname2host() uses uninitialized memory


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]