llama.cpp
22d68b8a - gguf: reject keys and tensor names containing NUL bytes (#33355)

Commit
1 day ago
gguf: reject keys and tensor names containing NUL bytes (#33355) * gguf: reject keys and tensor names containing NUL bytes Keys and tensor names are compared as full strings when checking for duplicates, but looked up as C strings by gguf_find_key and ggml_set_name. A key such as tokenizer.chat_template0x therefore shadows the real key for llama.cpp while other readers still see the original value, and two tensor names differing only after a NUL collapse to the same name. * gguf-py: reject keys and tensor names containing NUL bytes Match the C parser, so that tools built on GGUFReader such as model scanners flag these files instead of showing a value that llama.cpp does not use.
Parents
Loading