oss-fuzz icon indicating copy to clipboard operation
oss-fuzz copied to clipboard

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

Open Shivam7-1 opened this issue 1 year ago • 6 comments

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).

Shivam7-1 avatar Dec 10 '24 14:12 Shivam7-1

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

github-actions[bot] avatar Dec 10 '24 14:12 github-actions[bot]

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

Shivam7-1 avatar Dec 10 '24 15:12 Shivam7-1

Hii @DavidKorczynski Could you please Merge this PR as it was Approved @DavidKorczynski Just a Reminder for merging PR Thanks

Shivam7-1 avatar Dec 11 '24 17:12 Shivam7-1

Hii @DavidKorczynski is there Anything else is Required From My side to get this PR merge Thanks

Shivam7-1 avatar Dec 12 '24 12:12 Shivam7-1

@Shivam7-1 Stop creating, deleting and creating new comments that beg for the PR to be merged. These folks are busy. Give it at least a week for pinging anyone..

0xricksanchez avatar Dec 12 '24 14:12 0xricksanchez

Hii @DavidKorczynski Just a Reminder for merging PR CC @DonggeLiu Thanks

Shivam7-1 avatar Jan 28 '25 18:01 Shivam7-1