Re: [PATCH 0/4] Adding missing grub_strdup()/strdup() failure checks

Daniel Kiper via Grub-devel <[email protected]>
Newsgroups org.gnu.grub-devel
Message-ID <aRTjZV/[email protected]>
On Mon, Nov 10, 2025 at 08:27:18PM +0530, Avnish Chouhan wrote:
> This patch series adds a failure check after calling grub_strdup()/strdup.
> Missing a failure check after calling grub_strdup() can lead to undefined
> behavior. If it fails and returns NULL, subsequent dereferencing
> or writing to the pointer will likely result in a runtime error such as
> a segmentation fault.
>
> Patch 1/4 (0001-ieee1275-openfw-add-missing-grub_strdup-failure-chec.patch)
> Patch 2/4 (0002-script-execute-add-missing-grub_strdup-failure-check.patch)
> Patch 3/4 (0003-kern-mips-arc-add-missing-grub_strdup-failure-check.patch)
> Patch 4/4 (0004-osdep-linux-getroot-add-missing-strdup-failure-check.patch)
>
> Avnish Chouhan (4):
>  ieee1275/openfw: add missing grub_strdup failure checks
>  script/execute: add missing grub_strdup failure check
>  kern/mips/arc: add missing grub_strdup failure check
>  osdep/linux/getroot: add missing strdup failure checks

Reviewed-by: Daniel Kiper <[email protected]>

Thank you for fixing these issues!

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.