diff options
author | John Thacker <johnthacker@gmail.com> | 2021-09-25 08:15:24 -0400 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2021-09-25 08:15:24 -0400 |
commit | 1c3da46bf87e895fc29c0d6822d3a511000db9df (patch) | |
tree | 62ba0e16a8aed0f0a104214a926af351d502a5b2 /doc | |
parent | a7dfe534883ee1f9d9cc84195b64b9a6f1ca9d0d (diff) |
H265: Handle too large Exponential-Golomb coded values
We only allow exp-Golomb coded values to be as large as 32 bit
integers. When packets encode too large a value (invalid content),
clamp the value and report it as malformed with an expert info,
reporting the number of bits consumed (which will probably lead to
a BoundsError later in the packet.)
The case with 32 leading zeroes is a special case because for both
unsigned and signed interpretation there is one non overflowing value.
This is better than using DISSECTOR_ASSERT for invalid packet content.
Avoid left shifting a 32 bit integer by 32, which is undefined.
Use DISSECTOR_ASSERT_FIELD_TYPE at the beginning of the function rather
than using DISSECTOR_ASSERT in the middle, since it's more descriptive
in its error message and clearer code to do it at the start.
Same issue as #17612, commit a7dfe534883ee1f9d9cc84195b64b9a6f1ca9d0d.
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions