Skip to content

Commit ffb6f3d

Browse files
authored
vocab : correct bounds check for UGM XCDA array access (#17215)
1 parent 5d6838b commit ffb6f3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama-vocab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ struct llm_tokenizer_ugm_session {
10131013
}
10141014
private:
10151015
uint32_t get_node(size_t index) {
1016-
if (index > xcda_array_size) {
1016+
if (index >= xcda_array_size) {
10171017
throw std::runtime_error("Index out of array bounds in XCDA array!");
10181018
}
10191019
return xcda_array[index];

0 commit comments

Comments
 (0)