[FFmpeg-cvslog] lavc/subviewerdec: fix potential NULL deref.

Clément Bœsch git at videolan.org
Sun Jan 6 04:05:33 CET 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Sun Jan  6 04:01:11 2013 +0100| [2e7744a6a265604600f86a85c6961dbf5df9ecdd] | committer: Clément Bœsch

lavc/subviewerdec: fix potential NULL deref.

Fixes CID966647

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e7744a6a265604600f86a85c6961dbf5df9ecdd
---

 libavcodec/subviewerdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/subviewerdec.c b/libavcodec/subviewerdec.c
index 7580cbe..63be418 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");



More information about the ffmpeg-cvslog mailing list