Commit 693097c3 authored by Michael Niedermayer's avatar Michael Niedermayer

paf: avoid C99 overflows

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3ee8eefb
......@@ -212,8 +212,8 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
if (p->current_frame_block >= p->frame_blks)
return AVERROR_INVALIDDATA;
offset = p->blocks_offset_table[p->current_frame_block] & ~(1 << 31);
if (p->blocks_offset_table[p->current_frame_block] & (1 << 31)) {
offset = p->blocks_offset_table[p->current_frame_block] & ~(1U << 31);
if (p->blocks_offset_table[p->current_frame_block] & (1U << 31)) {
if (offset > p->audio_size - p->buffer_size)
return AVERROR_INVALIDDATA;
......
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