[Bug 1046] AIX 5.3 Garbage on Login

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Sat May 28 11:24:27 EST 2005


http://bugzilla.mindrot.org/show_bug.cgi?id=1046





------- Additional Comments From dtucker at zip.com.au  2005-05-28 11:24 -------
(In reply to comment #9) 
> It's a coding issue.  In the file "port-aix.c", line number 156, "msg" is 
> declared, but doesn't point to anything.  As a test, I changed *msg to *msg = 
> malloc(1024), rebuilt, and it solved the issues I was having.

msg is not initialized, but a pointer to msg is passed to passwdexpired().  On
AIX 5.2 and below, passwdexpired allocates memory itself.  From the
passwdexpired man page:

"Message Points to a pointer that the passwdexpired subroutine allocates memory
for and fills in. This string is suitable for printing and issues messages, such
as in how many days the password will expire."

What does the man page say on 5.3?

mallocing msg unconditionally will result in a memory leak on AIXes <= 5.2. 
Tim's suggestion on initializing to NULL will be OK, provided it resolves the
problem.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-bugs mailing list