mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc/movtextdec: keep the min size instead of max to fix overread.
Fixes Ticket #2087.
This commit is contained in:
parent
1dd4a21cb7
commit
7d66bc7920
@ -83,7 +83,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
|
|||||||
* In complex cases, there are style descriptors appended to the string
|
* In complex cases, there are style descriptors appended to the string
|
||||||
* so we can't just assume the packet size is the string size.
|
* 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;
|
ptr += 2;
|
||||||
|
|
||||||
ts_start = av_rescale_q(avpkt->pts,
|
ts_start = av_rescale_q(avpkt->pts,
|
||||||
|
Loading…
Reference in New Issue
Block a user