summaryrefslogtreecommitdiff
path: root/libavformat/paf.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-14 04:01:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-14 04:01:41 +0200
commit693097c355cba3af1cba24e762b8b6d21769076a (patch)
treec1e1123de0683b079a50259023388b1a6d3f09aa /libavformat/paf.c
parent3ee8eefbf2623e1e337df7d962412b0703336431 (diff)
downloadffmpeg-693097c355cba3af1cba24e762b8b6d21769076a.tar.gz
paf: avoid C99 overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/paf.c')
-rw-r--r--libavformat/paf.c4
1 files changed, 2 insertions, 2 deletions
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;