[FFmpeg-trac] #4515(avcodec:new): ffv1enc.c can reference an uninitialized variable
FFmpeg
trac at avcodec.org
Mon Apr 27 08:28:36 CEST 2015
#4515: ffv1enc.c can reference an uninitialized variable
---------------------------------------+---------------------------------
Reporter: jeremyhu | Owner:
Type: defect | Status: new
Priority: normal | Component: avcodec
Version: unspecified | Keywords:
Blocked By: | Blocking:
Reproduced by developer: 0 | Analyzed by developer: 0
---------------------------------------+---------------------------------
As observed in:
http://fate.ffmpeg.org/log.cgi?time=20150426121301&log=compile&slot=x86_64
-darwin-clang-3.7
{{{
/Users/jeremy/src/ffmpeg/fate/x86_64-darwin-
clang-3.7/src/libavcodec/ffv1enc.c:430:17: warning: variable 'a' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (lbd) {
^~~
/Users/jeremy/src/ffmpeg/fate/x86_64-darwin-
clang-3.7/src/libavcodec/ffv1enc.c:453:31: note: uninitialized use occurs
here
sample[3][0][x] = a;
^
/Users/jeremy/src/ffmpeg/fate/x86_64-darwin-
clang-3.7/src/libavcodec/ffv1enc.c:430:13: note: remove the 'if' if its
condition is always true
if (lbd) {
^~~~~~~~~
/Users/jeremy/src/ffmpeg/fate/x86_64-darwin-
clang-3.7/src/libavcodec/ffv1enc.c:429:13: note: variable 'a' is declared
here
int b, g, r, av_uninit(a);
^
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4515>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list