Opened 4 years ago

Closed 4 years ago

#4515 closed defect (wontfix)

ffv1enc.c can reference an uninitialized variable

Reported by: jeremyhu 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 Changed 4 years ago by jeremyhu

  • Version changed from unspecified to git-master

comment:2 Changed 4 years ago by cehoyos

  • Keywords ffv1 added
  • Resolution set to wontfix
  • Status changed from new to closed

This will have to be fixed in clang.

Note: See TracTickets for help on using tickets.