From 7085115f51ce9d02cfff216a3f74b1fb6715f38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 22 Aug 2018 14:58:30 +0200 Subject: 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 --- chromium/third_party/hunspell/google/bdict_reader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3