Opened 3 weeks ago

#6685 new defect

Indirect function call with the wrong number of arguments in cmdutils.c

Reported by: vedantk Owned by:
Priority: minor Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm working on making clang's function sanitizer (a part of the undefined behavior sanitizer) support C programs. I tested my patch on ffmpeg + fate-suite and found a minor issue.

The DEFINE_OPT_SHOW_SECTION macro in ffprobe.c is used to define functions which accept two arguments. These functions are then stored into option defs. In cmdutils.c, they are called with three arguments (in write_option()).

One solution is to change the macro to add in an extra unused parameter (this silences the runtime warning).

Change History (0)

Note: See TracTickets for help on using tickets.