From:             neufeind
Operating system: 
PHP version:      5.3.3
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:Segfault in filter_var with FILTER_VALIDATE_EMAIL with large 
amount of data

Description:
------------
Using the attached test-script with just a large amount of data (e.g. 8kb
of just "x") segfaults php. Tried with 5.3.3 (Fedora) and also some
5.3.4-snapshot that I could get hold of.



Crashed for me with around 8kb of data. If it works fine for you, maybe
increase that limit to 16kb or so.

Test script:
---------------
<?php

  $email = file_get_contents('x.data');

  $r = filter_var($email, FILTER_VALIDATE_EMAIL);

  var_dump($r);



// and just dump a large number of characters like "x" in x.data

// for a in `seq 1 8000`; do echo -n x>>x.data; done

Expected result:
----------------
bool(false)

Actual result:
--------------
segfault

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52929&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52929&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52929&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52929&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52929&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52929&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52929&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52929&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52929&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52929&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52929&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52929&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52929&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52929&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52929&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52929&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52929&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52929&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52929&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52929&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52929&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52929&r=mysqlcfg

Reply via email to