b9756
ggml-org/llama.cppb9756Jun 22, 2026by github-actions[bot]same day as b9754
What changed since b9754
Server edit_file heap-buffer-overflow on append at end of file is fixed; no other changes noted between b9754 and b9756.
Improvements
- The -1 line_start sentinel is now normalized to n so appends insert at end() rather than one past it.
- The -1 sentinel is restricted to append mode and explicitly rejected for replace/delete instead of silently overwriting the last line.
- The insert offset is parenthesized so empty-file appends compute the position as an int first, avoiding a transient begin() - 1 on a null data pointer.
Bug fixes
- Fixed a heap-buffer-overflow in the server's edit_file when appending at the end of a file with line_start -1.
- Prevented replace/delete operations from silently clobbering the last line when passed the -1 sentinel.
Upgrade notes
This is a drop-in patch with no config or API changes; rebuilding or pulling the new binaries is sufficient. If any client code relied on passing line_start -1 to replace or delete, switch it to an explicit line index, since that input is now rejected.
Analyzed Nov 1, 2026
Upgrading?
Release notes summary
Fixed a heap-buffer-overflow crash in the server's edit file functionality when appending to the end of an empty file.
Key Highlights
- Fix edit_file crash on append
- Normalize -1 index to n
- Restrict -1 to append mode only
Release Notes (excerpt)
<details open> server: fix edit_file crash on append at end of file (line_start -1) (#24893) line_start -1 normalized to n+1, so append inserted at lines.begin() + n + 1, one past end() -> heap-buffer-overflow in vector::_M_range_insert. Normalize -1 to n (insert at end()), restrict -1 to append mode and reject it for replace/delete instead of silently clobbering the last line. Parenthesize the insert offset so empty-file append computes the position as int first,…
Published by ggml-org on GitHub.
Read the full release notesRelated Repositories
:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
Godot Engine – Multi-platform 2D and 3D game engine
ClickHouse® is a real-time analytics database management system
Self-hosted game stream host for Moonlight.
DuckDB is a high-performance analytical database system