Indirect function call with the wrong number of arguments in cmdutils.c
|Reported by:||Vedant Kumar||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
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).