[Ffmpeg-devel] [PATCH] fix non char arrays feed to string functions
Måns Rullgård
mru
Thu Jan 25 10:36:23 CET 2007
Luca Barbato <lu_zero at gentoo.org> writes:
> makes few warnings disappear.
>
> (again from the another diego (yes I'm slow))
>
> Index: libavcodec/bitstream_filter.c
> ===================================================================
> --- libavcodec/bitstream_filter.c (revision 7568)
> +++ libavcodec/bitstream_filter.c (working copy)
> @@ -21,6 +21,9 @@
> #include "avcodec.h"
> #include "mpegaudio.h"
>
> +static const char ffcmp3_signature[11] =
> + { 'F', 'F', 'C', 'M', 'P', '3', ' ', '0', '.', '0', '\0' };
> +
> AVBitStreamFilter *first_bitstream_filter= NULL;
>
> void av_register_bitstream_filter(AVBitStreamFilter *bsf){
> @@ -153,7 +156,7 @@
> if(avctx->extradata_size == 0){
> avctx->extradata_size=15;
> avctx->extradata= av_malloc(avctx->extradata_size);
> - strcpy(avctx->extradata, "FFCMP3 0.0");
> + memcpy(avctx->extradata, ffcmp3_signature, sizeof(ffcmp3_signature));
> memcpy(avctx->extradata+11, buf, 4);
> }
> if(avctx->extradata_size != 15){
WTF is this supposed to fix? Rejected. All of it.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list