aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-10-16 21:47:00 +0200
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-10-17 15:50:26 +0200
commiteb751f06db9f627c8b5c63d08836a39f7572bf56 (patch)
tree35a535e04d6ab925d3be85de255796472001d857 /libavformat/matroskadec.c
parentd3874b74f35b17fd69a2074060fa5d6b1889796e (diff)
downloadffmpeg-eb751f06db9f627c8b5c63d08836a39f7572bf56.tar.gz
matroskadec: fix NULL pointer dereference
The problem was introduced in commit 1273bc6. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 8847c62e32..a5d3c0e543 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1759,7 +1759,7 @@ static int mkv_field_order(MatroskaDemuxContext *matroska, int64_t field_order)
/* workaround a bug in our Matroska muxer, introduced in version 57.36 alongside
* this function, and fixed in 57.52 */
- if (sscanf(matroska->muxingapp, "Lavf%d.%d.%d", &major, &minor, &micro) == 3)
+ if (matroska->muxingapp && sscanf(matroska->muxingapp, "Lavf%d.%d.%d", &major, &minor, &micro) == 3)
bttb = (major == 57 && minor >= 36 && minor <= 51 && micro >= 100);
switch (field_order) {