On 10/17/2016 10:05 AM, Benoit Fouet wrote: > 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 <jamr...@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?
I don't see why not. It's a one line change that zero initializes stack and removes noise from the valgrind fate clients, making actual memleaks and such in the future easy to notice after a quick glance. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel