Hi!

Attached patch fixes ticket #5174, there seems to be nothing invalid about a 
cursor outside of the screen or an empty cursor.

Please comment, Carl Eugen
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index 7d698f0..3b5cb29 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -309,7 +309,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void 
*data,
         return AVERROR_INVALIDDATA;
     }
 
-    if (!tsize)
+    if (!tsize || !AV_RL16(src + 37) || !AV_RL16(src + 39))
         skip_cursor = 1;
 
     if (!skip_cursor && tsize < 32) {
@@ -322,7 +322,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void 
*data,
     cur_x = AV_RL16(src + 33);
     cur_y = AV_RL16(src + 35);
     if (!skip_cursor && (cur_x > avctx->width || cur_y > avctx->height)) {
-        av_log(avctx, AV_LOG_WARNING,
+        av_log(avctx, AV_LOG_DEBUG,
                "Invalid cursor position: (%d,%d). Skipping cusor.\n",
                cur_x, cur_y);
         skip_cursor = 1;
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to