mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 09:02:20 +00:00
avformat/utils: Check size argument in ff_add_index_entry()
Fixes infinite loop Fixes Ticket3061 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e7811e48be
commit
210afae0ba
@ -1627,6 +1627,9 @@ int ff_add_index_entry(AVIndexEntry **index_entries,
|
||||
if(timestamp == AV_NOPTS_VALUE)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
if (size < 0 || size > 0x3FFFFFFF)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
if (is_relative(timestamp)) //FIXME this maintains previous behavior but we should shift by the correct offset once known
|
||||
timestamp -= RELATIVE_TS_BASE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user