[FFmpeg-devel] [PATCH 1/2] avformat/mov: zero initialize codec_name in mov_parse_stsd_video()

Benoit Fouet benoit.fouet at free.fr
Mon Oct 17 16:05:29 EEST 2016


Hi,


On 17/10/2016 02:34, James Almer wrote:
> Fixes valgrind warning about "Conditional jump or move depends on uninitialised value(s)"
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/mov.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index add1812..7462ecf 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -1802,7 +1802,7 @@ static int mov_codec_id(AVStream *st, uint32_t format)
>  static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
>                                   AVStream *st, MOVStreamContext *sc)
>  {
> -    uint8_t codec_name[32];
> +    uint8_t codec_name[32] = { 0 };
>      int64_t stsd_start;
>      unsigned int len;
>  

Do we really need to "fix" false positive from Valgrind?

-- 
Ben



More information about the ffmpeg-devel mailing list