| Change 180819946 by lbaudoin@lbaudoin:hunspell-fix:6844:citc on 2018/01/04 11:03:04 |
| |
| Initialize all the pointers in the SfxEntry constructor to prevent hunspell from dereferencing uninitialized memory when following the pointer chain. |
| |
| PRESUBMIT=passed |
| BUG=67842908,68294846 |
| R=samsonov,shine |
| APPROVED=samsonov,shine |
| REQUIRED_REVIEW=1 |
| DELTA_BY_EXTENSION=hxx=7 |
| OCL=180816035 |
| |
| Affected files ... |
| |
| ... //depot//src/hunspell/affentry.hxx#2 edit |
| ... //depot//testdata/poc-02d52382ead7347b24ada7d25e413a836129438617f849f44e08dd5019915024#1 add |
| ... //depot//testdata/poc-42e27028fdb17169fab11fbf2ed2c898e61f6105af09462653f2cd271e197f4f#1 add |
| |
| ==== //depot//src/hunspell/affentry.hxx#1 - /google/src/files/180819946/depot//src/hunspell/affentry.hxx ==== |
| --- /google/src/files/37375269/depot//src/hunspell/affentry.hxx 2012-10-31 14:23:51.000000000 -0400 |
| +++ /google/src/files/180819946/depot//src/hunspell/affentry.hxx 2018-01-04 14:03:04.000000000 -0500 |
| @@ -70,14 +70,14 @@ |
| AffixMgr* pmyMgr; |
| char * rappnd; |
| |
| - SfxEntry * next; |
| - SfxEntry * nexteq; |
| - SfxEntry * nextne; |
| - SfxEntry * flgnxt; |
| + SfxEntry * next = nullptr; |
| + SfxEntry * nexteq = nullptr ; |
| + SfxEntry * nextne = nullptr; |
| + SfxEntry * flgnxt = nullptr; |
| |
| - SfxEntry * l_morph; |
| - SfxEntry * r_morph; |
| - SfxEntry * eq_morph; |
| + SfxEntry * l_morph = nullptr; |
| + SfxEntry * r_morph = nullptr; |
| + SfxEntry * eq_morph = nullptr; |
| |
| public: |
| |