[FFmpeg-devel] Minor warning found by VC++ /analyze

Bruce Dawson brucedawson at google.com
Fri Mar 31 01:35:19 EEST 2017


I just pulled a report on new warnings reported by /analyze in Chromium and
I saw this one in ffmpeg that looks real:

third_party\ffmpeg\libavcodec\utils.c(2822) : warning C6001: Using
uninitialized memory 'got_frame'.

There is an error path - ret gets set to AVERROR(EINVAL) but then execution
continues, including a likely read from got_frame before the function
exits. I'm not sure if anything really bad can happen, but uninitialized
reads are undefined behavior.

FWIW

-- 
Bruce Dawson


More information about the ffmpeg-devel mailing list