Skip to content

Conversation

embg
Copy link
Owner

@embg embg commented Mar 17, 2024

Fuzzer coverage checks

I made sure that each of these changes in zstd_decompress.c individually cause the fuzzer to crash:

-        if (dctx->format == ZSTD_f_zstd1 && ZSTD_isLegacy(src, srcSize)) {
+        if (/*dctx->format == ZSTD_f_zstd1 &&*/ ZSTD_isLegacy(src, srcSize)) {
-        if (dctx->format == ZSTD_f_zstd1 && srcSize >= 4) {
+        if (/*dctx->format == ZSTD_f_zstd1 &&*/ srcSize >= 4) {
-                size_t const cSize = ZSTD_findFrameCompressedSize_advanced(istart, (size_t)(iend-istart), zds->format);
+                size_t const cSize = ZSTD_findFrameCompressedSize(istart, (size_t)(iend-istart));
-            if (zds->format == ZSTD_f_zstd1
-                && (MEM_readLE32(zds->headerBuffer) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) {  /* skippable frame */
+            if ((MEM_readLE32(zds->headerBuffer) & ZSTD_MAGIC_SKIPPABLE_MASK) == ZSTD_MAGIC_SKIPPABLE_START) {  /* skippable frame */

@embg embg force-pushed the magic_fuzz branch 11 times, most recently from 85e7036 to 75437df Compare March 18, 2024 18:47
@embg embg force-pushed the magic_fuzz branch 2 times, most recently from 91b1b38 to 2dab143 Compare March 19, 2024 16:50
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