Fix signed integer overflow
The operation "mRsmpInRear += framesRead;" would overflow the 32-bit variables within 12 minutes for MSD HAL StreamIn IEC61937 MAT 2.0 framed streams (that generate 61440 bytes per 20 milliseconds). Test: enable integer_overflow diagnostics, enable MSD HAL with IEC MAT patch, wait for 12 minutes for UBSan crash, and check record thread frame counts have exceeded 2^31. Change-Id: I9925bf39a1e3d910850efef859e0a412962391ac
Loading
Please register or sign in to comment