]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/paf.c
nutdec: check return value of av_new_packet()
[ffmpeg] / libavformat / paf.c
index 8fe2ac56382c5eb0e143423e27a91982ff61725f..e67732bb83ed36cf0e6712246eebeabf3e4419da 100644 (file)
@@ -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;