Commit 2e7744a6 authored by Clément Bœsch's avatar Clément Bœsch

lavc/subviewerdec: fix potential NULL deref.

Fixes CID966647
parent 3d0994be
...@@ -56,7 +56,7 @@ static int subviewer_decode_frame(AVCodecContext *avctx, ...@@ -56,7 +56,7 @@ static int subviewer_decode_frame(AVCodecContext *avctx,
AVBPrint buf; AVBPrint buf;
/* To be removed later */ /* 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 " av_log(avctx, AV_LOG_ERROR, "AVPacket is not clean (contains timing "
"information). You need to upgrade your libavformat or " "information). You need to upgrade your libavformat or "
"sanitize your packet.\n"); "sanitize your packet.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment