diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 00:59:42 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 00:59:42 +0000 |
commit | 2fc8ea249f325c2017137847bc1a565b77f40f11 (patch) | |
tree | 34f0783859f7637871650292705b657650f30800 /libavcodec/huffyuv.c | |
parent | 0ecca7a49f8e254c12a3a1de048d738bfbb614c6 (diff) | |
download | ffmpeg-2fc8ea249f325c2017137847bc1a565b77f40f11.tar.gz |
dissallow sprintf
Originally committed as revision 3823 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r-- | libavcodec/huffyuv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index 5dec85c0cf..fbc20ad5e2 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -1170,13 +1170,14 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, if((s->flags&CODEC_FLAG_PASS1) && (s->picture_number&31)==0){ int j; char *p= avctx->stats_out; + char *end= p + 1024*30; for(i=0; i<3; i++){ for(j=0; j<256; j++){ - sprintf(p, "%llu ", s->stats[i][j]); + snprintf(p, end-p, "%llu ", s->stats[i][j]); p+= strlen(p); s->stats[i][j]= 0; } - sprintf(p, "\n"); + snprintf(p, end-p, "\n"); p++; } }else{ |