1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavc/subviewerdec: fix potential NULL deref.

Fixes CID966647
This commit is contained in:
Clément Bœsch 2013-01-06 04:01:11 +01:00
parent 3d0994be2f
commit 2e7744a6a2

View File

@ -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");