1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

paf: avoid C99 overflows

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-14 04:01:41 +02:00
parent 3ee8eefbf2
commit 693097c355

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