Opened 7 months ago

Closed 7 months ago

#6362 closed defect (fixed)

expression is always false

Reported by: Appchecker Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: nut
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hello!

We've checked your code with appChecker static analyzer (https://cnpo.ru/en/solutions/appchecker.php) and found possible bug:

https://github.com/FFmpeg/FFmpeg/blob/59d219b91ef6c8f5415e174c920e07629312d1d6/libavformat/nutdec.c#L205

   if (nut->version < NUT_MIN_VERSION &&
        nut->version > NUT_MAX_VERSION) {
        av_log(s, AV_LOG_ERROR, "Version %d not supported.\n",
               nut->version);
        return AVERROR(ENOSYS);
    }

nut->version can't be < NUT_MIN_VERSION (2) and > NUT_MAX_VERSION (4) at the same time.

Possible defects were found by Echelon Team with appChecker static analyzer(https://cnpo.ru/en/solutions/appchecker.php)

Change History (1)

comment:1 Changed 7 months ago by cehoyos

  • Component changed from ffmpeg to avformat
  • Keywords nut added; weakness expression false cwe-570 code defect removed
  • Resolution set to fixed
  • Status changed from new to closed
  • Version changed from 2.8.11 to git-master

Should be fixed in 20da4135

Note: See TracTickets for help on using tickets.