summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
diff options
context:
space:
mode:
authorCarlos López <carlos.lopezr4096@gmail.com>2025-04-24 17:08:19 +0200
committerTom Rini <trini@konsulko.com>2025-04-28 13:25:59 -0600
commit2c529839a93d886253c596449545f62bec21a4ac (patch)
tree701328ac0c5c58c54502a095b76aca895da8be91 /arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
parent23e7088dde1a182bbc6b75bc642ee789f23429b2 (diff)
mkimage: fix option parsing segfault
getopt_long() expects a NULL-terminated list of structures. The current list in mkimage does not have a zero-filled structure at the end, which can cause getopt_long() to walk past the end of the array when passing an unknown option, causing a segmentation fault. As a reproducer, the following command causes a segmentation fault (tested in Debian 12): mkimage --foobar Signed-off-by: Carlos López <carlos.lopezr4096@gmail.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c')
0 files changed, 0 insertions, 0 deletions