Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fd56e815 authored by Dean Wheatley's avatar Dean Wheatley Committed by Andy Hung
Browse files

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
parent b7c14e4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment