Skip to content

Conversation

@kdkd
Copy link

@kdkd kdkd commented Nov 28, 2025

Commit from kdkd fork 272502d

Codec sanitization

ScreenVideo allocated more memory than necessary per block, and could run past EOF if the block was malformed.

ScreenVideo2 had the same issues as ScreenVideo, but calculated blockHeight and blockWidth incorrectly due to missing ().

ExtendedAudio did not rewind the pointer if it decided it couldn't handle the audio, and could cause an NPE on an unknown or invalid fourcc value.

AV1Video always thought data passed to it was AV1 data rather than checking the fourcc value.

MPEG1Video had the opposite problem, it looked to see if the data was AVC video data then tried to parse it as though it were MPEG1, and threw away the first configuration packet because decoderConfiguration wasn't initialized on the first pass.


ScreenVideo allocated more memory than necessary per block, and could run past EOF if the block was malformed.

ScreenVideo2 had the same issues as ScreenVideo, but calculated blockHeight and blockWidth incorrectly due to missing ().

ExtendedAudio did not rewind the pointer if it decided it couldn't handle the audio, and could cause an NPE on an unknown or invalid fourcc value.

AV1Video always thought data passed to it was AV1 data rather than checking the fourcc value.

MPEG1Video had the opposite problem, it looked to see if the data was AVC video data then tried to parse it as though it were MPEG1, and threw away the first configuration packet because decoderConfiguration wasn't initialized on the first pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant