Skip to content

Commit

Permalink
fixup debug zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber committed Jan 15, 2025
1 parent 2f243d0 commit 8900f3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util-file-swf-decompression.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ int FileSwfZlibDecompression(DetectEngineThreadCtx *det_ctx,
uint8_t *compressed_data, uint32_t compressed_data_len,
uint8_t *decompressed_data, uint32_t decompressed_data_len)
{
printf("lolz %d\n", __LINE__);
int ret = 1;
z_stream infstream;
memset(&infstream, 0, sizeof(infstream));
Expand All @@ -97,12 +98,14 @@ int FileSwfZlibDecompression(DetectEngineThreadCtx *det_ctx,
infstream.next_out = (Bytef *)decompressed_data;

int result = inflateInit(&infstream);
printf("lolz %d %d\n", result, __LINE__);
if (result != Z_OK) {
DetectEngineSetEvent(det_ctx, FILE_DECODER_EVENT_Z_UNKNOWN_ERROR);
return 0;
}

result = inflate(&infstream, Z_NO_FLUSH);
printf("lolz %d %d\n", result, __LINE__);
switch(result) {
case Z_STREAM_END:
break;
Expand Down

0 comments on commit 8900f3b

Please sign in to comment.