grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Adding a failure check after grub_malloc()
@ 2025-10-28 16:31 Avnish Chouhan
  2025-10-28 16:31 ` [PATCH 1/4] normal: Adding a grub_malloc failure check in completion.c Avnish Chouhan
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Avnish Chouhan @ 2025-10-28 16:31 UTC (permalink / raw)
  To: grub-devel; +Cc: daniel.kiper, Avnish Chouhan

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

 grub-core/normal/completion.c | 3 +++
 grub-core/partmap/msdos.c     | 3 +++
 grub-core/mmap/mmap.c         | 3 +++
 grub-core/lib/legacy_parse.c  | 3 +++
 4 files changed

-- 
2.31.1


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-11-05 19:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-28 16:31 [PATCH 0/4] Adding a failure check after grub_malloc() Avnish Chouhan
2025-10-28 16:31 ` [PATCH 1/4] normal: Adding a grub_malloc failure check in completion.c Avnish Chouhan
2025-11-02 14:54   ` Sudhakar Kuppusamy
2025-10-28 16:32 ` [PATCH 2/4] Adding a grub_malloc failure check in msdos.c Avnish Chouhan
2025-11-02 14:57   ` Sudhakar Kuppusamy
2025-10-28 16:32 ` [PATCH 3/4] Adding a grub_malloc failure check in mmap.c Avnish Chouhan
2025-11-02 14:58   ` Sudhakar Kuppusamy
2025-10-28 16:32 ` [PATCH 4/4] Adding a grub_malloc failure check in legacy_parse.c Avnish Chouhan
2025-11-02 15:00   ` Sudhakar Kuppusamy
2025-11-05 19:11 ` [PATCH 0/4] Adding a failure check after grub_malloc() Daniel Kiper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).