Skip to content

Output value of avm_uleb_decode() is <= UINT32_MAX#5010

Merged
urvangjoshi merged 1 commit into
AOMediaCodec:mainfrom
wantehchang:remove-unneeded-UINT32_MAX-check
May 28, 2026
Merged

Output value of avm_uleb_decode() is <= UINT32_MAX#5010
urvangjoshi merged 1 commit into
AOMediaCodec:mainfrom
wantehchang:remove-unneeded-UINT32_MAX-check

Conversation

@wantehchang
Copy link
Copy Markdown
Member

If the leb128() value read from the bitstream is > UINT32_MAX, avm_uleb_decode() fails and returns -1. Therefore after a successful avm_uleb_decode() call, the output value must be <= UINT32_MAX.

Comment thread av2/decoder/obu.c
@urvangjoshi urvangjoshi marked this pull request as ready for review May 28, 2026 18:29
@urvangjoshi urvangjoshi self-requested a review May 28, 2026 18:30
If the leb128() value read from the bitstream is > UINT32_MAX,
avm_uleb_decode() fails and returns -1. Therefore after a successful
avm_uleb_decode() call, the output value must be <= UINT32_MAX.
@urvangjoshi urvangjoshi force-pushed the remove-unneeded-UINT32_MAX-check branch from e2e15e7 to 8e5e645 Compare May 28, 2026 18:48
@urvangjoshi urvangjoshi merged commit f425b5a into AOMediaCodec:main May 28, 2026
109 checks passed
@wantehchang wantehchang deleted the remove-unneeded-UINT32_MAX-check branch May 28, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants