Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spanify woff2_dec #178

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Spanify woff2_dec #178

wants to merge 8 commits into from

Conversation

mdenton8
Copy link

This PR uses std::span for all the raw pointers that can reasonably be rewritten (found with -Wunsafe-buffer-usage). When built with libc++ hardening this will crash on all out-of-bounds accesses instead of causing undefined behavior. This is mostly only done for woff2 decompression.

This bumps the required C++ version from 11 to 20 to get std::span, but alternatively I could pull in a span implementation from somewhere else (e.g. Chromium).

This also adds a simple correctness "fuzzer" which takes input and then compresses/decompresses/re-compresses it, and checks the two compressed versions are equivalent.

This bumps the required C++ version to C++20, in order to use
std::span.
This fuzzer takes input, compresses it, decompressed, and compresses
it again, and checks that the two compressed versions are equal.
This is a simple correctness fuzzer. Note that we can't just
compare the decompressed version to the original input because
decompression might produce a slightly different TTF file to the
input, even though they are functionally the exact same thing.
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.

1 participant