Bug #51289 [Asn->Csd]: unaligned memory access in enchant.c

From: Date: Sat, 01 May 2010 23:33:03 +0000
Subject: Bug #51289 [Asn->Csd]: unaligned memory access in enchant.c
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150099@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51289&edit=1

 ID:               51289
 Updated by:       geissert@php.net
 Reported by:      geissert@php.net
 Summary:          unaligned memory access in enchant.c
-Status:           Assigned
+Status:           Closed
 Type:             Bug
 Package:          *Spelling functions
 Operating System: linux ia64
 PHP Version:      5.3.2
 Assigned To:      geissert

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2010-05-02 01:32:41] geissert@php.net

Automatic comment from SVN on behalf of geissert
Revision: http://svn.php.net/viewvc/?view=revision&revision=298863
Log: Fix unaligned memory accesses in enchant (bug #51289)

------------------------------------------------------------------------
[2010-03-14 15:44:23] pajoye@php.net

Please add the necessary test cases and apply the patch.

By the way, please apply the patch as well to pecl/enchant so it will be
in the next release.

------------------------------------------------------------------------
[2010-03-13 04:35:20] geissert@php.net

The following patch has been added/updated:

Patch Name: enchant_unaligned_memory_access.patch
Revision:   1268451320
URL:       
http://bugs.php.net/patch-display.php?bug=51289&patch=enchant_unaligned_memory_access.patch&revision=1268451320

------------------------------------------------------------------------
[2010-03-13 04:26:14] geissert@php.net

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 this bug report at http://bugs.php.net/bug.php?id=51289&edit=1


Thread (4 messages)

« previous php.bugs (#150099) next »