#36471 [NEW]: iconv_mime_encode segmentation fault
| From: | chen dot daqi at gmail dot com | Date: | Tue, 21 Feb 2006 08:37:41 +0000 |
| Subject: | #36471 [NEW]: iconv_mime_encode segmentation fault | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-93463@lists.php.net to get a copy of this message | ||
From: chen dot daqi at gmail dot com
Operating system: linux
PHP version: 5.1.2
PHP Bug Type: Unknown/Other Function
Bug description: iconv_mime_encode segmentation fault
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 bug report at http://bugs.php.net/?id=36471&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36471&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36471&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36471&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36471&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36471&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36471&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36471&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36471&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36471&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36471&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36471&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36471&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36471&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36471&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36471&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36471&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36471&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36471&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36471&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36471&r=mysqlcfg