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

Update fuzz.js Improve Fuzzing Coverage and Robustness in fuzz.js for OSS-Fuzz Integration #12827

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Shivam7-1
Copy link
Contributor

PR Description: Enhanced the file to improve input variation, validate decompressed outputs, and handle edge cases for compression and decompression. Added parameter range checks, gzip header testing, and improved error logging for better OSS-Fuzz integration and increased line coverage.

Changes Done in Code:

  1. Enhanced Input Variation:

    • Added valid ranges for parameters (level, windowBits, memLevel, strategy) using consumeIntegralInRange.
    • Tested edge cases like empty inputs and large inputs (up to 10 MB).
  2. Output Validation:

    • Implemented checks to ensure decompressed data matches the original input for inflate, inflateRaw, and ungzip.
  3. Extended Gzip Testing:

    • Added gzip options with header parameter (including metadata like text, time, os, and extra).
  4. Improved Error Handling:

    • Logged unhandled errors for debugging.
    • Enhanced ignoredError to capture additional error contexts.
  5. Code Modularity:

    • Modularized repeated logic (e.g., byte array comparison with arraysEqual function).

Copy link

Shivam7-1 is a new contributor to projects/pako. The PR must be approved by known contributors before it can be merged. The past contributors are: 0xricksanchez

@Shivam7-1
Copy link
Contributor Author

Shivam7-1 commented Dec 10, 2024

Hii @0xricksanchez Could you please Review this PR
Is above changes is ok to move forward?
Thanks

Copy link
Contributor

@0xricksanchez 0xricksanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Shivam7-1
Copy link
Contributor Author

Hii @DavidKorczynski Could you please Merge this PR as it was Approved

Thanks

@Shivam7-1
Copy link
Contributor Author

Hii @DavidKorczynski Could You please merge this PR
Thanks

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