dissallow sprintf

Originally committed as revision 3823 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2005-01-12 00:59:42 +00:00
parent 0ecca7a49f
commit 2fc8ea249f
9 changed files with 16 additions and 13 deletions

View File

@@ -762,7 +762,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
strcpy(channels_str, "5:1");
break;
default:
sprintf(channels_str, "%d channels", enc->channels);
snprintf(channels_str, sizeof(channels_str), "%d channels", enc->channels);
break;
}
if (enc->sample_rate) {