6e6ad60bfa
- hashmgr-add-word.patch: fix allocation error in HashMgr::add_word (from http://sourceforge.net/p/hunspell/patches/49/) OBS-URL: https://build.opensuse.org/request/show/223453 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/hunspell?expand=0&rev=33
14 lines
659 B
Diff
14 lines
659 B
Diff
Index: hunspell-1.3.2/src/hunspell/hashmgr.cxx
|
|
===================================================================
|
|
--- hunspell-1.3.2.orig/src/hunspell/hashmgr.cxx
|
|
+++ hunspell-1.3.2/src/hunspell/hashmgr.cxx
|
|
@@ -116,7 +116,7 @@ int HashMgr::add_word(const char * word,
|
|
int al, const char * desc, bool onlyupcase)
|
|
{
|
|
bool upcasehomonym = false;
|
|
- int descl = desc ? (aliasm ? sizeof(short) : strlen(desc) + 1) : 0;
|
|
+ int descl = desc ? (aliasm ? sizeof(char *) : strlen(desc) + 1) : 0;
|
|
// variable-length hash record with word and optional fields
|
|
struct hentry* hp =
|
|
(struct hentry *) malloc (sizeof(struct hentry) + wbl + descl);
|