mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-14 19:31:24 +00:00
avcodec/srtdec: fix potential overread.
This commit is contained in:
parent
860a081058
commit
3a54c221d5
@ -204,7 +204,8 @@ static const char *read_ts(const char *buf, int *ts_start, int *ts_end,
|
|||||||
"%*[ ]X1:%u X2:%u Y1:%u Y2:%u",
|
"%*[ ]X1:%u X2:%u Y1:%u Y2:%u",
|
||||||
&hs, &ms, &ss, ts_start, &he, &me, &se, ts_end,
|
&hs, &ms, &ss, ts_start, &he, &me, &se, ts_end,
|
||||||
x1, x2, y1, y2);
|
x1, x2, y1, y2);
|
||||||
buf += strcspn(buf, "\n") + 1;
|
buf += strcspn(buf, "\n");
|
||||||
|
buf += !!*buf;
|
||||||
if (c >= 8) {
|
if (c >= 8) {
|
||||||
*ts_start = 100*(ss + 60*(ms + 60*hs)) + *ts_start/10;
|
*ts_start = 100*(ss + 60*(ms + 60*hs)) + *ts_start/10;
|
||||||
*ts_end = 100*(se + 60*(me + 60*he)) + *ts_end /10;
|
*ts_end = 100*(se + 60*(me + 60*he)) + *ts_end /10;
|
||||||
|
Loading…
Reference in New Issue
Block a user