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
Loading
Please register or sign in to comment