Bug #53091 [Opn->Dup]: Crashes when I try to filter a text of > 2264 characters
Edit report at http://bugs.php.net/bug.php?id=53091&edit=1
ID: 53091
Updated by: rasmus@php.net
Reported by: SimonSimCity at googlemail dot com
Summary: Crashes when I try to filter a text of > 2264
characters
-Status: Open
+Status: Duplicate
Type: Bug
Package: Filter related
Operating System: Linux Debian
PHP Version: 5.3.3
Block user comment: N
New Comment:
This has already been reported and fixed and will be in 5.3.4.
Previous Comments:
------------------------------------------------------------------------
[2010-10-17 22:13:26] SimonSimCity at googlemail dot com
Description:
------------
The server crashes if I want to filter a string which has more
characters than
2264.
The string in my test-code below contains 2265 characters.
If I call this script using the apache-php-mod I get an empty response.
Otherwise if I call this script by using the command-line it crashes
either - but
now I get the error-message: Segmentation fault
I have tested some other filters and it's only FILTER_VALIDATE_EMAIL who
crashes
in my tests.
You can check the length of the string first by using this information:
http://email.about.com/od/emailbehindthescenes/f/address_length.htm
Test script:
---------------
<?php
$extremeString =
'01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
89012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234';
echo filter_var("test@example.com", FILTER_VALIDATE_EMAIL) ? "good\n" :
"bad\n";
echo filter_var("test#example.com", FILTER_VALIDATE_EMAIL) ? "good\n" :
"bad\n";
echo filter_var("$extremeString", FILTER_VALIDATE_EMAIL) ? "good\n" :
"bad\n";
echo "DONE.";
Expected result:
----------------
good
bad
bad
DONE.
Actual result:
--------------
good
bad
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53091&edit=1
Thread (2 messages)