Re: [PATCH 0/4] Adding a failure check after grub_malloc()

Daniel Kiper <[email protected]>
Newsgroups org.gnu.grub-devel
Message-ID <[email protected]>
On Tue, Oct 28, 2025 at 10:01:58PM +0530, Avnish Chouhan wrote:
> This patch series adds a NULL check after calling grub_malloc().
> Missing a failure check after calling grub_malloc() can lead to undefined
> behavior. If the allocation 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-normal-Adding-a-grub_malloc-failure-check-in-completion-c.patch)
> Patch 2/4 (0002-Adding-a-grub_malloc-failure-check-in-msdos-c.patch)
> Patch 3/4 (0003-Adding-a-grub_malloc-failure-check-in-mmap-c.patch)
> Patch 4/4 (0004-Adding-a-grub_malloc-failure-check-in-legacy_parse-c.patch)
>
> Avnish Chouhan (4):
>  normal: Adding a grub_malloc failure check in completion.c
>  Adding a grub_malloc failure check in msdos.c
>  Adding a grub_malloc failure check in mmap.c
>  Adding a grub_malloc failure check in legacy_parse.c

For all patches 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.