summaryrefslogtreecommitdiffstats
path: root/libavcodec/movtextdec.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-29 14:56:59 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-31 17:23:31 +0200
commit9009fa6de4004b5d9ddb2429784ac234123ec7e5 (patch)
tree4219c14b667c0ac088b65fd8656d09cf68aed232 /libavcodec/movtextdec.c
parent3d5dc7d87df4753967591b803c1bddb13033ffc3 (diff)
downloadffmpeg-streaming-9009fa6de4004b5d9ddb2429784ac234123ec7e5.zip
ffmpeg-streaming-9009fa6de4004b5d9ddb2429784ac234123ec7e5.tar.gz
movtextdec: fix return value for too small packets.
Diffstat (limited to 'libavcodec/movtextdec.c')
-rw-r--r--libavcodec/movtextdec.c2
1 files changed, 1 insertions, 1 deletions
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
OpenPOWER on IntegriCloud