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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 23 07:01:29 2024 UTC