From: o7si Date: Wed, 12 Nov 2025 22:41:02 +0000 (+0800) Subject: vocab : correct bounds check for UGM XCDA array access (#17215) X-Git-Tag: upstream/0.0.7446~404 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=ffb6f3d921bbc64d559164e23671a710a4dd9de5;p=pkg%2Fggml%2Fsources%2Fllama.cpp vocab : correct bounds check for UGM XCDA array access (#17215) --- diff --git a/src/llama-vocab.cpp b/src/llama-vocab.cpp index 735c5d54..97f374ea 100644 --- a/src/llama-vocab.cpp +++ b/src/llama-vocab.cpp @@ -1013,7 +1013,7 @@ private: } private: uint32_t get_node(size_t index) { - if (index > xcda_array_size) { + if (index >= xcda_array_size) { throw std::runtime_error("Index out of array bounds in XCDA array!"); } return xcda_array[index];