[FFmpeg-devel] [PATCH 09/10] avformat/matroskadec: Improve length check

Michael Niedermayer michael at niedermayer.cc
Sat Mar 9 01:45:01 EET 2019


On Fri, Mar 08, 2019 at 10:26:03AM +0100, Andreas Rheinhardt wrote:
> The earlier code had three flaws:
> 
> 1. The case of an unknown-sized element inside a finite-sized element
> (which is against the specifications) was not caught.
> 
> 2. The error message wasn't helpful: It compared the length of the child
> with the offset of the end of the parent and claimed that the first
> exceeds the latter, although that is not necessarily true.
> 
> 3. Unknown-sized elements that are not parsed can't be skipped. Given
> that according to the Matroska specifications only the segment and the
> clusters can be of unknown-size, this is handled by not allowing any
> other units to have infinite size whereas the earlier code would seek
> back by 1 byte upon encountering an infinite-size element that ought
> to be skipped.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at googlemail.com>
> ---
>  libavformat/matroskadec.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)

i think this patch is ok but there are people around who know matroska better
than i do ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190309/2af9edb0/attachment.sig>


More information about the ffmpeg-devel mailing list