1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

mimic: do not continue if swap_buf_size is 0

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
Paul B Mahol
2012-03-12 14:56:41 +00:00
committed by Ronald S. Bultje
parent dba425ad7a
commit 33c5c3ad07

View File

@@ -312,7 +312,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
int quality, num_coeffs;
int swap_buf_size = buf_size - MIMIC_HEADER_SIZE;
if(buf_size < MIMIC_HEADER_SIZE) {
if (buf_size <= MIMIC_HEADER_SIZE) {
av_log(avctx, AV_LOG_ERROR, "insufficient data\n");
return -1;
}