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

Skip to content
Commit 123801b1 authored by Myles Watson's avatar Myles Watson
Browse files

PDL: Exit early when parsing counted vectors

Guard against decrementing size_t when it is 0.

Adds an extra if to parsing code of the form:
while ((count > 0) &&          <--- Extra check
       (count-- > 0) &&
       (bytes_left_to_parse > 0)) {
}

Bug: 322230000
Test: atest bluetooth_packet_parsing_test
Flag: EXEMPT, no logical change
Change-Id: I2fd976f7ffb20c8d25ebfa18cb532bbb7fe85a11
parent 82e31399
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment