Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
AVIOContext *pb = ctx->pb;
AUDMuxContext *a = ctx->priv_data;
AVIOContext *pb = ctx->pb;
AUDMuxContext *a = ctx->priv_data;
- av_assert1(pkt->size < UINT16_MAX && (pkt->size * 4) < UINT16_MAX);
+ if (pkt->size > UINT16_MAX / 4)
+ return AVERROR_INVALIDDATA;
/* Assumes ADPCM since this muxer doesn't support SND1 or PCM format. */
avio_wl16(pb, pkt->size);
avio_wl16(pb, pkt->size * 4);
/* Assumes ADPCM since this muxer doesn't support SND1 or PCM format. */
avio_wl16(pb, pkt->size);
avio_wl16(pb, pkt->size * 4);