Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Fix: Prevent Out-of-Bounds Reads in GGUF Parser #1985

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Conversation

qnixsynapse
Copy link
Contributor

Describe Your Changes

This PR adds bounds checking to prevent out-of-bounds memory access when parsing GGUF metadata strings and arrays. Previously, malformed or corrupted GGUF files could cause the parser to read beyond the allocated data buffer, potentially leading to crashes or undefined behavior.

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Thanks to @supriza for the report!

@qnixsynapse qnixsynapse merged commit 7ff86d0 into dev Feb 19, 2025
8 checks passed
@qnixsynapse qnixsynapse deleted the fix/gguf_parser branch February 19, 2025 07:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants