From 693097c355cba3af1cba24e762b8b6d21769076a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 14 Oct 2012 04:01:41 +0200 Subject: paf: avoid C99 overflows Signed-off-by: Michael Niedermayer --- libavformat/paf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/paf.c') diff --git a/libavformat/paf.c b/libavformat/paf.c index 8fe2ac5638..e67732bb83 100644 --- a/libavformat/paf.c +++ b/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; -- cgit v1.2.3