aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-01-06 04:01:11 +0100
committerClément Bœsch <ubitux@gmail.com>2013-01-06 04:04:22 +0100
commit2e7744a6a265604600f86a85c6961dbf5df9ecdd (patch)
treead370ee23156184e63d226e5920166cc8dbe1d7e
parent3d0994be2fa912d76835057276243c4c75b71200 (diff)
downloadffmpeg-2e7744a6a265604600f86a85c6961dbf5df9ecdd.tar.gz
lavc/subviewerdec: fix potential NULL deref.
Fixes CID966647
-rw-r--r--libavcodec/subviewerdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/subviewerdec.c b/libavcodec/subviewerdec.c
index 7580cbe679..63be4188b9 100644
--- a/libavcodec/subviewerdec.c
+++ b/libavcodec/subviewerdec.c
@@ -56,7 +56,7 @@ static int subviewer_decode_frame(AVCodecContext *avctx,
AVBPrint buf;
/* To be removed later */
- if (sscanf(ptr, "%*u:%*u:%*u.%*u,%*u:%*u:%*u.%*u%c", &c) == 1) {
+ if (ptr && sscanf(ptr, "%*u:%*u:%*u.%*u,%*u:%*u:%*u.%*u%c", &c) == 1) {
av_log(avctx, AV_LOG_ERROR, "AVPacket is not clean (contains timing "
"information). You need to upgrade your libavformat or "
"sanitize your packet.\n");