#36471 [Fbk->Opn]: iconv_mime_encode segmentation fault
| From: | chen dot daqi at gmail dot com | Date: | Wed, 22 Feb 2006 01:36:44 +0000 |
| Subject: | #36471 [Fbk->Opn]: iconv_mime_encode segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93503@lists.php.net to get a copy of this message | ||
ID: 36471
User updated by: chen dot daqi at gmail dot com
Reported By: chen dot daqi at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: Unknown/Other Function
Operating System: linux
PHP Version: 5.1.2
New Comment:
Hi, I have tried php5.1-latest.tar.gz on linux, but it also got
segmentation fault. You may need to check it on linux.
Previous Comments:
------------------------------------------------------------------------
[2006-02-21 14:01:48] mike@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
Works fine here (tm):
string(49) "Subject: =?UTF-8?B?VGhpcyBpcyBlbmNvZGUgdBCyjQg=?="
------------------------------------------------------------------------
[2006-02-21 09:37:41] chen dot daqi at gmail dot com
Description:
------------
Hi, when I set $preferences['line-length'] = -1,
iconv_mime_encode will get segmentation fault on linux.
Reproduce code:
---------------
<?php
$preferences = array(
"scheme" => "B",
"input-charset" => "ISO8859-1",
"output-charset" => "UTF-8",
"line-length" => 76,
"line-break-chars" => "\n"
);
$preferences["line-length"] = -1;
var_dump(iconv_mime_encode("Subject", "This is encode test ",
$preferences));
?>
Expected result:
----------------
Just a warning of line-length can't be less than 0
Actual result:
--------------
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36471&edit=1