webrtc_m130/common_video
Danil Chapovalov cd8b36bb9f Fix integer underflow in H264 bitstream parser
num_ref are represented using golomb and may be very large.
BitstreamReader is generally resilent to many consenquites fail reads, but not when number of reads comparable to int limit.
This change address the issue in two ways, either one is enough, but both are helpful in their own way:

H264 parser now fails faster when number of references is too large.
BitstreamReader now is resilent to unlimited number of fail reads.

Bug: chromium:352402499
Change-Id: I19646bc3f53cd2970393d00bc143400b1fdf5473
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357100
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42628}
2024-07-12 15:01:55 +00:00
..
2022-09-30 08:44:30 +00:00