Skip to content

Fix geometry section being read past its end - #27

Merged
tbybell merged 2 commits into
gtkwave:mainfrom
Rodrigodd:upstream/geometry-short
Oct 18, 2026
Merged

tbybell merged 2 commits into
gtkwave:mainfrom
Rodrigodd:upstream/geometry-short

Conversation

@Rodrigodd

Copy link
Copy Markdown
Contributor

Problem: if the geometry section is shorter than the number of handles it announces, or if it ends on a unterminated varint, the reader will read past the end of the section, causing a heap buffer overflow.

Solution: stop when the width run out, and mark the open as failed. Also add a null byte at the end of the geometry section buffer to catch any unterminated varints.

Problem: if the geometry section is shorter than the number of handles
it announces, or if it ends on a unterminated varint, the reader will
read past the end of the section, causing a heap buffer overflow.

Solution: stop when the width run out, and mark the open as failed. Also
add a null byte at the end of the geometry section buffer to catch any
unterminated varints.
@tbybell
tbybell merged commit f4289a8 into gtkwave:main Oct 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants