Browse Source

lavc/movtextdec: keep the min size instead of max to fix overread.

Fixes Ticket #2087.
tags/n1.1
Clément Bœsch 13 years ago
parent
commit
7d66bc7920
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/movtextdec.c

+ 1
- 1
libavcodec/movtextdec.c View File

@@ -83,7 +83,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
* In complex cases, there are style descriptors appended to the string
* so we can't just assume the packet size is the string size.
*/
end = ptr + FFMAX(2 + AV_RB16(ptr), avpkt->size);
end = ptr + FFMIN(2 + AV_RB16(ptr), avpkt->size);
ptr += 2;

ts_start = av_rescale_q(avpkt->pts,


Loading…
Cancel
Save