[FFmpeg-cvslog] paf: avoid C99 overflows

Michael Niedermayer git at videolan.org
Sun Oct 14 04:08:21 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 14 04:01:41 2012 +0200| [693097c355cba3af1cba24e762b8b6d21769076a] | committer: Michael Niedermayer

paf: avoid C99 overflows

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=693097c355cba3af1cba24e762b8b6d21769076a
---

 libavformat/paf.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/paf.c b/libavformat/paf.c
index 8fe2ac5..e67732b 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;
 



More information about the ffmpeg-cvslog mailing list