]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ggml: handle ggml_init failure to fix NULL pointer deref (llama/8692)
authorDavidKorczynski <redacted>
Thu, 25 Jul 2024 21:23:05 +0000 (22:23 +0100)
committerGeorgi Gerganov <redacted>
Thu, 8 Aug 2024 19:48:46 +0000 (22:48 +0300)
commit0620fe00ec24d861a056a5353da1bb1959d63fdf
treeb9fe40867cc95ce34145f48366432efb5df0c209
parent31d0a9a14fff0139ec1fc82bd7d05130d1c7d0fe
ggml: handle ggml_init failure to fix NULL pointer deref (llama/8692)

`ggml_init` can fail if no unused context is found. In that case, a NULL-pointer deref will happen later in the code during a call to `ggml_set_on_alloc`.

This fixes it by bailing out if no context is found.
ggml/src/ggml.c