]> git.ipfire.org Git - thirdparty/grub.git/commit
script/execute: Add missing grub_strdup() failure check
authorAvnish Chouhan <avnish@linux.ibm.com>
Mon, 10 Nov 2025 14:57:20 +0000 (20:27 +0530)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 18 Nov 2025 11:49:31 +0000 (12:49 +0100)
commit9eebd67744a472a8b1885ecc8a0518fb1632ef12
tree45da4b97e88856687748b20de11176e4114abc02
parentf0170c21777ef42ec0d011da8a50ee970eae7cdd
script/execute: Add missing grub_strdup() failure check

If grub_strdup() fails, it returns NULL and passing NULL further down to
the code can lead to segmentation fault or an undefined behavior.

Signed-off-by: Avnish Chouhan <avnish@linux.ibm.com>
Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/script/execute.c