Merge commit '710b0e27025948b7511821c2f888ff2d74a59e14'

* commit '710b0e27025948b7511821c2f888ff2d74a59e14':
  smacker: Avoid integer overflow when allocating packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-12 11:38:55 +02:00
commit c16cd55593

View File

@ -331,7 +331,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
}
flags >>= 1;
}
if (frame_size < 0)
if (frame_size < 0 || frame_size >= INT_MAX/2)
return AVERROR_INVALIDDATA;
if (av_new_packet(pkt, frame_size + 769))
return AVERROR(ENOMEM);