Repository navigation
ba8e289
Pre-releasefix(rtc): Charge each feedback line as it prints back
SessionDescription::parse bounds the text a description's feedback
prints back, but charged an a=rtcp-fb line by the value it read,
times the codecs it lands on. A * line prints once per codec with that
codec's payload type in place of the *: two bytes more for each one
numbered 100 or above. A description read within the bound could then
print one past it, which the second parse refused. OSS-Fuzz issue
586587100 found this in the sdp target, whose round trip asserts that
what parses prints a description that parses.
Each codec a line lands on is now charged what its line prints: the
payload type's digits and the rest of the value, plus the 16 bytes that
were already allowed for. A description that is printed and parsed again
is charged the same, so what parses at the bound parses again.
The fuzzer's testcase is now refused by the first parse. A new test
parses wildcard lines over payload types 100-115 on either side of the
bound and parses each printed description again; without the change it
fails at 1007- and 1008-byte lines. The at-bound tests take payload
types from 100, where every codec prints three digits, so their sums
still meet the bound exactly.