#include <stdlib.h>
-#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/bytestream.h"
size -= 4;
}
if (size > 52) {
- av_assert0(AV_INPUT_BUFFER_PADDING_SIZE <= 52);
size -= 52;
if (bytestream2_get_bytes_left(&p) < size)
return AVERROR_INVALIDDATA;
os->pflags |= AV_PKT_FLAG_KEY;
lb = ((*p & 2) << 1) | ((*p >> 6) & 3);
+ if (os->psize < lb + 1)
+ return AVERROR_INVALIDDATA;
+
os->pstart += lb + 1;
os->psize -= lb + 1;
while (lb--)
- os->pduration += p[lb+1] << (lb*8);
+ os->pduration += (uint64_t)p[lb+1] << (lb*8);
return 0;
}