mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avcodec/huffyuvenc: fail if stats_out is too small instead of silently truncating
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bc11b2c3e6
commit
a301bb63f0
@ -947,6 +947,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
}
|
}
|
||||||
snprintf(p, end-p, "\n");
|
snprintf(p, end-p, "\n");
|
||||||
p++;
|
p++;
|
||||||
|
if (end <= p)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
avctx->stats_out[0] = '\0';
|
avctx->stats_out[0] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user