diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-05-21 23:51:01 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-05-21 23:58:14 +0200 |
commit | 2589d545ec099c7b670b185d06fbf9ca841fb748 (patch) | |
tree | 26da599afc3ba2032f7463da1995fea4bc3771a3 /i18npool/source | |
parent | e346aa639ced4fae653b52b0812fa5ca12949125 (diff) |
i18npool: ASAN: fix off-by-one in gendict's index2 array
The charArray always contains the size of lenArray *before* it is
extended, i.e., the last valid index.
Change-Id: Id1f4e1f2cb55a88ef5339e9d962a3adf4cde91f9
Diffstat (limited to 'i18npool/source')
-rw-r--r-- | i18npool/source/breakiterator/gendict.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx index a779981af698..8bec7d203fb4 100644 --- a/i18npool/source/breakiterator/gendict.cxx +++ b/i18npool/source/breakiterator/gendict.cxx @@ -151,8 +151,8 @@ static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sa #endif } } - lenArray.push_back( lenArrayCurr ); // store last ending pointer charArray[current+1] = lenArray.size(); + lenArray.push_back( lenArrayCurr ); // store last ending pointer #ifndef DICT_JA_ZH_IN_DATAFILE fputs("\n};\n", source_fp); #endif |