mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-11 09:25:51 +00:00
The Python GGUF reader lacked two guards the C++ loader has: - n_dims read as uint32 with no GGML_MAX_DIMS bound -> crafted file with huge n_dims triggers oversized memmap read / OOM. - np.prod(dims) on uint64 wraps silently -> a crafted dims triple can overflow to a tiny element count, passing an undersized read through. Add a GGML_MAX_DIMS check and compute the element count with Python ints. Fixes #25378 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_gguf_reader_validation.py | ||
| test_metadata.py | ||
| test_quants.py | ||