php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53091 Crashes when I try to filter a text of > 2264 characters
Submitted: 2010-10-17 22:13 UTC Modified: 2010-10-17 22:19 UTC
From: SimonSimCity at googlemail dot com Assigned:
Status: Duplicate Package: Filter related
PHP Version: 5.3.3 OS: Linux Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: SimonSimCity at googlemail dot com
New email:
PHP Version: OS:

 

 [2010-10-17 22:13 UTC] 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 = '012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234';

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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-17 22:19 UTC] rasmus@php.net
-Status: Open +Status: Duplicate
 [2010-10-17 22:19 UTC] rasmus@php.net
This has already been reported and fixed and will be in 5.3.4.
 [2019-10-24 12:46 UTC] soniyadoll672 at gmail dot com
Thanks for Sharing information this information is very helpful and useful for me and other persons. I like your work. <b><a href="https://www.crackedseries.com/voicemod-pro-crack/"> voicemod pro crack  </a></b>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 03:01:28 2024 UTC