Merge pull request #183 from nmoinvaz/master
Fixed MSAN use-of-uninitialized in tinfl_decompress when invalid dist.
This commit is contained in:
commit
fe03be2c51
@ -498,7 +498,7 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex
|
|||||||
}
|
}
|
||||||
|
|
||||||
dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start;
|
dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start;
|
||||||
if ((dist > dist_from_out_buf_start || dist_from_out_buf_start == 0) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
|
if ((dist == 0 || dist > dist_from_out_buf_start || dist_from_out_buf_start == 0) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
|
||||||
{
|
{
|
||||||
TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED);
|
TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user