avformat/mxfdec: detect loops during header parsing
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Jan 2014 03:49:50 +0000 (04:49 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 8 Jan 2014 09:19:36 +0000 (10:19 +0100)
commitde14fe7e297f1e73223a9594e1fb3ff4fc7b529e
treee7c2cb79d48fa89fd57456a1a44c16f13b6bb222
parent580d3ef6fea356785496b9b06798b7aa7080c0ea
avformat/mxfdec: detect loops during header parsing

The header parser uses forward and backward parsing, making the
bulletproof prevention of loops difficult, thus this simple
detection code.
If someone improves the forward/backward parsing so it cannot loop
then this commit should be reverted

Fixes Ticket3278

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1c010fd035c1a14dc73827b84f21f593e969a5d6)
libavformat/mxfdec.c