aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-18 23:54:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-18 23:54:56 +0100
commitf371396dfb95c116a05e9b9f690fa916bb2d815e (patch)
treec4617cbccc15dbae0cbe0aa14c8e1ccf1a9d916a /libavformat
parenta9ef21bbe2eb0115cfcb048d53f084e900092e71 (diff)
downloadffmpeg-f371396dfb95c116a05e9b9f690fa916bb2d815e.tar.gz
rl2demux: Fix FPE
Fixes Ticket788 Bug found by Oana Stratulat Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/rl2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index 530e0dfb9a..78edec5b18 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -138,6 +138,9 @@ static av_cold int rl2_read_header(AVFormatContext *s,
/** setup audio stream if present */
if(sound_rate){
+ if(channels <= 0)
+ return AVERROR_INVALIDDATA;
+
pts_num = def_sound_size;
pts_den = rate;