paf: avoid C99 overflows

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/6/head
Michael Niedermayer 12 years ago
parent 3ee8eefbf2
commit 693097c355
  1. 4
      libavformat/paf.c

@ -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;

Loading…
Cancel
Save