Skip to content

Update FastLZ and fix remaining memory safety issues in it - #22

Merged
tbybell merged 3 commits into
gtkwave:mainfrom
Rodrigodd:upstream/fastlz-update
Oct 15, 2026
Merged

tbybell merged 3 commits into
gtkwave:mainfrom
Rodrigodd:upstream/fastlz-update

Conversation

@Rodrigodd

Copy link
Copy Markdown
Contributor

One of the bugs that I found in the work I mentioned in #20 was actually in FastLZ. Some of the bugs were already fixed upstream, so I updated the vendored copy with the latest version, but there were still some issues remaining. So I pulled the change from ariya/FastLZ#12, which fixed them.

Additionally, I added -fno-sanitize=alignment to fastlz.c because the sanitizer would otherwise trigger on intentional unaligned reads performed by FastLZ. Currently no tests trigger this, but I am unsure if the tests I am adding in other PRs might. I previously had some tests that trigger it, but I removed them when I realized they were actually testing FastLZ itself rather than this project.

Rodrigodd and others added 3 commits October 14, 2026 19:31
Update the vendored copy with `fastlz.c` and `fastlz.h` from the master
branch of https://github.com/ariya/FastLZ at commit b1342da, from August
2024. The file is labeled as version 0.5.0, but that version was first
released in February 2020. The vendored version before this commit was
based on one from 2007.

The new version bounds-checks the input, so it supersedes some of the
checks previously introduced in this vendored copy. The new bounds checks
cover more areas than the previous ones, but they still do not cover
everything (this is fixed in the follow-up commit).
…125 OOB read)

Pulled from ariya/FastLZ#12, commit
d29d1abeb1d503db15586788249011ea8a753b70.
@tbybell
tbybell merged commit 7dee10b into gtkwave:main Oct 15, 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.

3 participants