Skip to content

packetizer: fix invalid flac streaminfo size check

Kakadus requested to merge Kakadus/vlc:fix-streaminfo-size-check into master

Alternative approach to !4822 (closed). There, we suggested to remove the complete check for fLaC inside streaminfo metadata blocks. Since this "historical variant check" should stay, we dug deeper and looked at it again with a fresh mind.

We noticed, that in the case the streaminfo metadata block starts with fLaC, it is not guaranteed that after the shift, p_extra has still enough data. Thus, FLAC_ParseStreamInfo is called with a too small p_extra. The assertion error is merely a symptom of this error.

We fix this by checking the shifted i_extra instead.

Sample from !4822

For logs of the crash, see !4822 (closed) directly.

Merge request reports