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/14122] memory leak in getpwuid()


http://sourceware.org/bugzilla/show_bug.cgi?id=14122

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
         AssignedTo|unassigned at sourceware    |ppluzhnikov at google dot
                   |dot org                     |com

--- Comment #4 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-05-19 22:07:06 UTC ---
Thanks.

I do see several possibilities for a leak in nss_parse_service_list:

      new_service = (service_user *) malloc (sizeof (service_user)
                                             + (line - name + 1));

...

              /* Compare with known statii.  */
              if (line - name == 7)
                {
                  if (__strncasecmp (name, "SUCCESS", 7) == 0)
                    status = NSS_STATUS_SUCCESS;
                  else if (__strncasecmp (name, "UNAVAIL", 7) == 0)
                    status = NSS_STATUS_UNAVAIL;
                  else
                    return result;  /* <<< Leak? */
                }
...


What does your /etc/nsswitch.conf look like?

> My glibc built from the git repository is not working

In what way does it not work?

It might be hard to verify the fix, unless I can reproduce the leak, or you can
get a git build working.

-- 
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]