]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
vocab : correct bounds check for UGM XCDA array access (#17215)
authoro7si <redacted>
Wed, 12 Nov 2025 22:41:02 +0000 (06:41 +0800)
committerGitHub <redacted>
Wed, 12 Nov 2025 22:41:02 +0000 (23:41 +0100)
src/llama-vocab.cpp

index 735c5d547f9e4097a9c09255f93b692d4088d834..97f374eac9570bb368e259d88ef59bc520fa4553 100644 (file)
@@ -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];