[FFmpeg-cvslog] movtextdec: fix return value for too small packets.
Nicolas George
git at videolan.org
Tue Jul 31 17:35:56 CEST 2012
ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sun Jul 29 14:56:59 2012 +0200| [9009fa6de4004b5d9ddb2429784ac234123ec7e5] | committer: Nicolas George
movtextdec: fix return value for too small packets.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9009fa6de4004b5d9ddb2429784ac234123ec7e5
---
libavcodec/movtextdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 43ebb78..b34523d 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -66,7 +66,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
const char *end;
if (!ptr || avpkt->size <= 2)
- return 0;
+ return avpkt->size ? AVERROR_INVALIDDATA : 0;
/*
* The first two bytes of the packet are the length of the text string
More information about the ffmpeg-cvslog
mailing list