diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2018-08-22 14:58:30 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2018-09-03 07:35:42 +0000 |
commit | 3779b31a077dea95b06d5432b9256997cf3cf190 (patch) | |
tree | 4116b258250737d021d80ad8043e64cc52728fcc | |
parent | 922a17dfc0045e5ca565faf446c8ce09557e92cf (diff) |
Fix hunspell::NodeReader::affix_id_for_leaf bounds check
Last leaf node's affix ID is currently always zero due to bad bounds check.
Task-number: QTBUG-70034
Change-Id: I4c7865cac4fb7a79811232000f613151875e7ee2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 7085115f51ce9d02cfff216a3f74b1fb6715f38d)
-rw-r--r-- | chromium/third_party/hunspell/google/bdict_reader.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chromium/third_party/hunspell/google/bdict_reader.cc b/chromium/third_party/hunspell/google/bdict_reader.cc index 358a8e2624e..de5158076b3 100644 --- a/chromium/third_party/hunspell/google/bdict_reader.cc +++ b/chromium/third_party/hunspell/google/bdict_reader.cc @@ -76,7 +76,7 @@ class NodeReader { // additional affix IDs following the node when leaf_has_following is set, // but this will not handle those. inline int affix_id_for_leaf() const { - if (node_offset_ >= bdict_length_ - 2) { + if (node_offset_ >= bdict_length_ - 1) { is_valid_ = false; return 0; } |