diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/udeflate.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/udeflate.cc b/src/lib/udeflate.cc index baab208..5cd7973 100644 --- a/src/lib/udeflate.cc +++ b/src/lib/udeflate.cc @@ -422,6 +422,10 @@ int8_t udeflate_zlib(unsigned char *input_buf, uint16_t input_len, return UDEFLATE_ERR_FDICT; } + if ((((uint16_t)input_buf[0] << 8) | input_buf[1]) % 31) { + return UDEFLATE_ERR_FCHECK; + } + uint8_t ret = udeflate(input_buf + 2, input_len - 2, output_buf, output_len); |