--- comm-1.9.2/mozilla/extensions/spellcheck/hunspell/src/hashmgr.cpp +++ comm-1.9.2/mozilla/extensions/spellcheck/hunspell/src/hashmgr.cpp @@ -187,7 +187,7 @@ struct hentry* hp = (struct hentry *) malloc (sizeof(struct hentry) + wbl + descl); if (!hp) return 1; - char * hpw = &(hp->word); + char * hpw = HENTRY_WORD(hp); strcpy(hpw, word); if (ignorechars != NULL) { if (utf8) { --- comm-1.9.2/mozilla/extensions/spellcheck/hunspell/src/htypes.hxx +++ comm-1.9.2/mozilla/extensions/spellcheck/hunspell/src/htypes.hxx @@ -68,7 +68,7 @@ #define H_OPT_PHON (1 << 2) // see also csutil.hxx -#define HENTRY_WORD(h) &(h->word) +#define HENTRY_WORD(h) ((char *) &h + offsetof(struct hentry, word)) // approx. number of user defined words #define USERWORD 1000