|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51289 unaligned memory access in enchant.c
Submitted: 2010-03-13 04:26 UTC Modified: 2010-11-15 21:12 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: Assigned: geissert (profile)
Status: Closed Package: Enchant related
PHP Version: 5.3.2 OS: linux ia64
Private report: No CVE-ID: None
 [2010-03-13 04:26 UTC]
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


enchant_unaligned_memory_access.patch (last revision 2010-03-13 03:35 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-13 04:35 UTC]
The following patch has been added/updated:

Patch Name: enchant_unaligned_memory_access.patch
Revision:   1268451320
 [2010-03-14 15:44 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: geissert
 [2010-03-14 15:44 UTC]
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-05-02 01:32 UTC]
Automatic comment from SVN on behalf of geissert
Log: Fix unaligned memory accesses in enchant (bug #51289)
 [2010-05-02 01:33 UTC]
-Status: Assigned +Status: Closed
 [2010-05-02 01:33 UTC]
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
Thank you for the report, and for helping us make PHP better.

 [2010-11-15 21:12 UTC]
-Package: *Spelling functions +Package: Enchant related
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 23 00:01:31 2024 UTC