]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
Fix memory bug in grammar parser (#7194)
authorJustine Tunney <redacted>
Fri, 10 May 2024 11:01:08 +0000 (07:01 -0400)
committerGitHub <redacted>
Fri, 10 May 2024 11:01:08 +0000 (21:01 +1000)
commit4e3880978f8b1bf546dd4e6f3b524d6b8739c49c
tree54ab13653c57d8a5ecb709947dd5a43596ca64c2
parentf89fe2732c5709f6e86d5f4aee2e6d2a561f2eb2
Fix memory bug in grammar parser (#7194)

The llama.cpp grammar parser had a bug where forgetting to add a closing
quotation mark to strings would cause parsing to crash. Anyone running a
server on a public endpoint is advised to upgrade. To reproduce this bug

    ./llamafile -m foo.gguf -p bar --grammar 'root::="'

Credit for discovering and reporting this issue goes to Eclypsium
Security Researcher Richard Johnson <redacted>.
common/common.cpp
common/grammar-parser.cpp
examples/llava/llava-cli.cpp
examples/main/main.cpp