mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Fixed MSAN use-of-uninitialized in tinfl_decompress when invalid dist is decoded. In this instance dist was 31 which s_dist_base translates as 0.
https://oss-fuzz.com/testcase-detail/4863557237473280
This commit is contained in:
		| @@ -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); | ||||||
|                 } |                 } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user