#47736 [Opn->Ver]: imap_headerinfo() segfaults with large address lists

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               47736
 Updated by:       [email protected]
-Summary:          imap_headerinfo Segfault  with large To:
 Reported By:      etremblay at kronostechnologies dot com
-Status:           Open
+Status:           Verified
 Bug Type:         IMAP related
-Operating System: linux
+Operating System: *
-PHP Version:      5.2.9
+PHP Version:      5.*, 6CVS (2009-03-31)
 New Comment:

This explains the bug:

http://markmail.org/message/ypvowfyqcijit4f5




Previous Comments:
------------------------------------------------------------------------

[2009-03-23 12:22:38] etremblay at kronostechnologies dot com

libc-client2007b (ubuntu intrepid)
I try the current snapshot of php.  Post back in 2 minutes.

------------------------------------------------------------------------

[2009-03-23 12:16:27] [email protected]

Which imap version do you use?

------------------------------------------------------------------------

[2009-03-23 12:14:50] etremblay at kronostechnologies dot com

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb757e700 (LWP 21722)]
0xb7e7fbb6 in memcpy () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7e7fbb6 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0xbf877e84 in ?? ()
#2  0xb6c72d42 in ?? () from /usr/lib/libc-client.so.2007b
#3  0xb6c738b3 in rfc822_output_address () from
/usr/lib/libc-client.so.2007b
#4  0xb6c73abd in rfc822_output_address_list () from
/usr/lib/libc-client.so.2007b
#5  0xb6f9a0ea in _php_rfc822_write_address (addresslist=0xb8ccc6f8) at
/opt/php-5.2.9/ext/imap/php_imap.c:3947
#6  0x0061632e in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

------------------------------------------------------------------------

[2009-03-20 19:24:37] etremblay at kronostechnologies dot com

Description:
------------
This is a duplicate of bug #19280 which is closed.

I can reproduced it php 5.2.9.  
With 5.2.6, it worked well.

I see that imap address related code have been touched by bug #46918
(shown in 5.2.9 releasenotes)

Look like someone broke it when fixing some other issue.

Reproduce code:
---------------
Look in bug #19280

Expected result:
----------------
No segfault

Actual result:
--------------
Segfault


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47736&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.