WPrefs: Add check for invalid OPEN_MENU/EXEC in PL-Menu to avoid potential crash
commit8e47ca8e62b3dabbe97ddb46c6cd072dba07daf6
authorChristophe CURIS <christophe.curis@free.fr>
Sun, 16 May 2021 13:47:07 +0000 (16 15:47 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 18 May 2021 16:49:17 +0000 (18 17:49 +0100)
tree4b1270b1da3c7f8af5014509ba1f996672b3d536
parent29cf48b934fcc4f82a33d9ca8137fc1c3807d078
WPrefs: Add check for invalid OPEN_MENU/EXEC in PL-Menu to avoid potential crash

As reported by Coverity (CID #50047, #50048), if the proplist is incorrect
and has an OPEN_MENU or (SH)EXEC command without its arguments, we did
dereference a NULL pointer.
Now we simply return the NULL value, appropriate to have the caller of the
function issue a message.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
WPrefs.app/Menu.c