bug #9461 - imap_open crash when connecting to nntp with username and password

From: Date: Tue, 01 May 2001 17:00:39 +0000
Subject: bug #9461 - imap_open crash when connecting to nntp with username and password
Groups: php.dev 
Request: Send a blank email to php-dev+get-53206@lists.php.net to get a copy of this message
Note: I would have added this to the bug database if I could figure out how. It seems that people can only modify their own bug reports ... not add to bug reports supported by others. Feel free to educate me on this. Like the author of bug #9461, I also tracked the problem down to mm_login() in ext/imap/php_imap.c [that is where my stack was getting stomped]. I replaced the later two calls to strncpy() in the function, with calls to strcpy(), and now I can use the function to login to news servers with no problem! The code in mm_login() looks correct to me - but I cannot believe that there is a bug in Linux's libc.a:strncpy(). I have a web based gateway up and running with hundreds of user's using my modified imap_open() to successfully connect to nntp with their usernames and passwords (we always require authentication). My modification seems to be a good workaround - but I don't know why. James

« previous php.dev (#53206) next »