From:             geissert
Operating system: linux ia64
PHP version:      5.3.2
Package:          *Spelling functions
Bug Type:         Bug
Bug description:unaligned memory access in enchant.c

Description:
------------
ext/enchant/tests/bug13181.php triggers an unaligned memory access in
enchant.c's enchant_dict_suggest().



enchant_dict_quick_check() is also affected, so adding a test case (the one
from the documentation but simply count()ing the returned array for >0, for
example) is a good idea.



Attached patch fixes the first case.



Expected result:
----------------
resource(5) of type (enchant_dict)

resource(5) of type (enchant_dict)

resource(6) of type (enchant_broker)

resource(6) of type (enchant_broker)

resource(7) of type (enchant_dict)

resource(7) of type (enchant_dict)

Actual result:
--------------
resource(5) of type (enchant_dict)

resource(5) of type (enchant_dict)

Bus error

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

Reply via email to