Merge pull request #2246 from philsmd/master

fixes #2244: avoid false negatives by allowing a more flexible zlib header
This commit is contained in:
Jens Steube
2019-12-11 19:01:15 +01:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -513,7 +513,9 @@ KERNEL_FQ void m21800_comp (KERN_ATTR_TMPS_ESALT (electrum_tmp_t, electrum_t))
// early reject
if ((buf[0] & 0x0007ffff) != 0x00059c78) return;
u32 zlib_header = buf[0] & 0x0007ffff;
if ((zlib_header != 0x00049c78) && (zlib_header != 0x00059c78)) return;
buf[1] ^= iv[1];
buf[2] ^= iv[2];

View File

@@ -168,7 +168,7 @@ sub module_generate_hash
my $zlib_rate = ord (substr ($compressed_data, 2, 1)) & 0x07;
if ($zlib_rate != 0x05)
if (($zlib_rate != 0x04) && ($zlib_rate != 0x05))
{
next;
}