Bug #60626 [Asn->Bgs]: filter_var crash
Edit report at https://bugs.php.net/bug.php?id=60626&edit=1
ID: 60626
Updated by: pajoye@php.net
Reported by: stephanvanruth at gmail dot com
Summary: filter_var crash
-Status: Assigned
+Status: Bogus
Type: Bug
Package: *General Issues
Operating System: Win 7 x64
PHP Version: 5.4.0RC4
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
See http://msdn.microsoft.com/en-us/library/xd3shwhf(v=vs.71).aspx
And no, no need to assign to me, there is no bug.
We do not control how apache is built nor how it is configured (stack size
option).
Cheers.
Previous Comments:
------------------------------------------------------------------------
[2011-12-31 14:02:09] stephanvanruth at gmail dot com
t.php:
<?php
$mail =
filter_var('the-total-length@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org',
FILTER_VALIDATE_EMAIL);
file_put_contents('test.txt', $mail);
?>
Success!
test.txt has been created and contains the given string.
works with both:
php t.php
php -n t.php
Thnx for this, whenever I 'think' I have found a bug, I will try this first.
I'm gonna google "Apache stack too small" now.
Happy New Year!
Stephan
------------------------------------------------------------------------
[2011-12-31 11:14:15] pajoye@php.net
It sounds to me like your stack is too small, are you using it within Apache?
Can you try in CLI using php.exe t.php and then using php.exe -n t.php please?
------------------------------------------------------------------------
[2011-12-29 22:29:48] stephanvanruth at gmail dot com
Description:
------------
Crash when a string longer than 225 characters (while containing @) is passed to filter_var
Test script:
---------------
filter_var('the-total-length@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org',
FILTER_VALIDATE_EMAIL);
Expected result:
----------------
return the input given
Actual result:
--------------
crash
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60626&edit=1
Thread (4 messages)