Opened 10 years ago

Closed 10 years ago

#4515 closed defect (wontfix)

ffv1enc.c can reference an uninitialized variable

Reported by: Jeremy Huddleston Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: ffv1
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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);
            ^

Change History (2)

comment:1 by Jeremy Huddleston, 10 years ago

Version: unspecifiedgit-master

comment:2 by Carl Eugen Hoyos, 10 years ago

Keywords: ffv1 added
Resolution: wontfix
Status: newclosed

This will have to be fixed in clang.

Note: See TracTickets for help on using tickets.