Opened 9 years ago

Closed 9 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


As observed in:

/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, 9 years ago

Version: unspecifiedgit-master

comment:2 by Carl Eugen Hoyos, 9 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.