]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
fix potential bug reading model data into a small size optimized string which could...
authorbert hubert <redacted>
Sat, 10 Dec 2022 12:09:31 +0000 (13:09 +0100)
committerGeorgi Gerganov <redacted>
Sat, 10 Dec 2022 14:20:48 +0000 (16:20 +0200)
commitd1da35de06219656b6579bbc8be36459d859f5de
treeb8aa13e5f7849f039ca7803d27bc5cdf9f794db1
parent603f97ba1173ba0b2fc6e7bd8b8e8ac4a48a8375
fix potential bug reading model data into a small size optimized string which could lead to memory corruption. In an SSO string, you can't write data to &str[0] and expect it to work well.

Also added a small wrapper function to more safely read model data without having to get the sizeof right. I tested this on tiny, base and large models, there was no change in behaviour.
whisper.cpp