From: Stephen Seo Date: Sat, 28 Sep 2024 10:07:12 +0000 (+0900) Subject: Fix potential NULL-ptr dereference X-Git-Tag: 1.0~1^2~35 X-Git-Url: https://git.seodisparate.com/stephenseo/static/static/git-logo.png?a=commitdiff_plain;h=a81ec4434a94e16d8576a1f609a6d7856baec8d6;p=SimpleArchiver Fix potential NULL-ptr dereference --- diff --git a/src/archiver.c b/src/archiver.c index a993b18..1cd5e29 100644 --- a/src/archiver.c +++ b/src/archiver.c @@ -1259,6 +1259,8 @@ int simple_archiver_parse_archive_info(FILE *in_f, int_fast8_t do_extract, } uc_heap_buf[u16 - 1] = 0; fprintf(stderr, "Decompressor cmd: %s\n", uc_heap_buf); + decompressor_cmd = heap_buf; + heap_buf = NULL; } } else { fprintf(stderr, "De/compressor flag is NOT set.\n");