|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36471 iconv_mime_encode segmentation fault
Submitted: 2006-02-21 09:37 UTC Modified: 2006-03-02 01:00 UTC
From: chen dot daqi at gmail dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.1.2 OS: linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-02-21 09:37 UTC] chen dot daqi at gmail dot com
Hi, when I set $preferences['line-length'] = -1, 
iconv_mime_encode will get segmentation fault on linux.

Reproduce code:
$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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-21 14:01 UTC]
Please try using this CVS snapshot:
For Windows:

Works fine here (tm):
string(49) "Subject: =?UTF-8?B?VGhpcyBpcyBlbmNvZGUgdBCyjQg=?="
 [2006-02-22 02:36 UTC] chen dot daqi at gmail dot com
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.
 [2006-02-22 08:35 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

 [2006-03-02 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 01 04:03:45 2023 UTC