mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-27 21:40:34 +00:00
flv: Validate the packet size
Size can be negative at that point. Bug-Id: 1041 CC: libav-stable@libav.org
This commit is contained in:
parent
4809781586
commit
279e3aaa14
@ -912,6 +912,12 @@ skip:
|
||||
st->codecpar->codec_id == AV_CODEC_ID_H264) {
|
||||
int type = avio_r8(s->pb);
|
||||
size--;
|
||||
|
||||
if (size < 0) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto leave;
|
||||
}
|
||||
|
||||
if (st->codecpar->codec_id == AV_CODEC_ID_H264) {
|
||||
// sign extension
|
||||
int32_t cts = (avio_rb24(s->pb) + 0xff800000) ^ 0xff800000;
|
||||
|
Loading…
Reference in New Issue
Block a user