Skip to content

LibGfx/JPEG: Make sure sampling factors are in the allowed range #24965

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

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

LucasChollet
Copy link
Member

As written in the spec (B.2.2 Frame header syntax), only values between 0 and 4 are allowed.

This fixes oss-fuzz issue 68784:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68784

As written in the spec (B.2.2 Frame header syntax), only values between
0 and 4 are allowed.

This fixes oss-fuzz issue 68784:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68784
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Aug 24, 2024
@nico
Copy link
Contributor

nico commented Aug 24, 2024

Is the oss fuzz test small enough to be included as a test? (Not super important.)

@LucasChollet
Copy link
Member Author

Yep, it's not even a kilo. I have a bunch lying around on my computer (mainly for TIFF though), I was starting to think that I should push all of them. Do you think they are all worth their own test, or just one iterating over all of them? IMO the latter is good enough. If you agree, I will then add this PR's test with the others.

@nico
Copy link
Contributor

nico commented Aug 24, 2024

Single test with loop seems fine 🙂

Copy link

stale bot commented Sep 18, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

@stale stale bot added the stale label Sep 18, 2024
@nico nico merged commit 2fd4dc1 into SerenityOS:master Sep 18, 2024
11 checks passed
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label Sep 18, 2024
@nico
Copy link
Contributor

nico commented Sep 18, 2024

If you still have the test files, put them in another PR. I figured merging this without test is better than having stalebot close it.

@LucasChollet
Copy link
Member Author

I figured merging this without test is better than having stalebot close it.

I thought that it was what we agreed on 😅. I was waiting for my two PRs (this one + TIFF) to get merged before adding all my dozen fuzzer-found test cases in one go.

Thanks for the merge!

@nico
Copy link
Contributor

nico commented Sep 18, 2024

Oooh sorry, I thought you were planning on adding them to the PRs! I'll merge the other one too then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants