diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-14 02:03:38 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-14 03:03:42 +0400 |
commit | 1f1960519a1700985b5f645a2950c10581f78a73 (patch) | |
tree | 2a8f60ad4794df96fdec8cbf837d3c3a717ef9d9 | |
parent | 334a0d15c6acd1ea607475d7ae24c949597b5de3 (diff) |
lxfdec: fix "no audio stream" check. avoid null ptrs deref
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/lxfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c index bf17d87a33..dbb5f53385 100644 --- a/libavformat/lxfdec.c +++ b/libavformat/lxfdec.c @@ -165,7 +165,7 @@ static int get_packet_header(AVFormatContext *s) break; case 1: //audio - if (!(st = s->streams[1])) { + if (!s->streams || !(st = s->streams[1])) { av_log(s, AV_LOG_INFO, "got audio packet, but no audio stream present\n"); break; } |