Commit 220603d0 authored by James Almer's avatar James Almer

Merge commit '279e3aaa'

* commit '279e3aaa':
  flv: Validate the packet size
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents eb54efc1 279e3aaa
......@@ -1152,6 +1152,12 @@ retry_duration:
st->codecpar->codec_id == AV_CODEC_ID_MPEG4) {
int type = avio_r8(s->pb);
size--;
if (size < 0) {
ret = AVERROR_INVALIDDATA;
goto leave;
}
if (st->codecpar->codec_id == AV_CODEC_ID_H264 || st->codecpar->codec_id == AV_CODEC_ID_MPEG4) {
// sign extension
int32_t cts = (avio_rb24(s->pb) + 0xff800000) ^ 0xff800000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment