coreboot/src
Patrick Georgi c59426f60d malloc/memalign: Return NULL if the request is too large
It's what this function family is defined to do, we currently don't
usually run into the case (see: not too many die() instances going
around), it's more useful to try to recover, and the JPEG parser can run
into it if the work buffer size exceeds the remaining heap, whereas its
sole user (the bootsplash code) knows what to do when seeing a NULL.

Use xmalloc() if you want an allocation that either works or dies.

tl;dr: That code path isn't usually taken. Right now it crashes. With
this patch it _might_ survive. There is a use-case for doing it like
that now.

Change-Id: I262fbad7daae0ca3aab583fda00665a2592deaa8
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80226
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-01-29 19:12:43 +00:00
..
acpi device: Add inline method to identify PATH_ROOT 2024-01-24 08:46:19 +00:00
arch device/device.h: Drop multiple links 2024-01-29 18:23:22 +00:00
commonlib acpi,arch,commonlib: Rename Makefiles from .inc to .mk 2024-01-24 08:32:11 +00:00
console lib,console,sbom: Rename Makefiles from .inc to .mk 2024-01-24 10:12:57 +00:00
cpu cpu: Rename Makefiles from .inc to .mk 2024-01-24 08:35:01 +00:00
device device/device.h: Drop multiple links 2024-01-29 18:23:22 +00:00
drivers soc/intel/common: Add lunarlake device IDs 2024-01-26 21:56:13 +00:00
ec ec: Rename Makefiles from .inc to .mk 2024-01-24 08:35:25 +00:00
include device/device.h: Drop multiple links 2024-01-29 18:23:22 +00:00
lib malloc/memalign: Return NULL if the request is too large 2024-01-29 19:12:43 +00:00
mainboard soc/amd: use common ACPI_SCI_IRQ definition 2024-01-27 16:39:21 +00:00
northbridge device/device.h: Drop multiple links 2024-01-29 18:23:22 +00:00
sbom src, util: Clean up makefile.inc in text, help & comments 2024-01-26 20:15:18 +00:00
security device, security: Rename Makefiles from .inc to .mk 2024-01-24 10:13:21 +00:00
soc device/device.h: Drop multiple links 2024-01-29 18:23:22 +00:00
southbridge device/device.h: Drop multiple links 2024-01-29 18:23:22 +00:00
superio superio: Rename Makefiles from .inc to .mk 2024-01-24 10:03:21 +00:00
vendorcode vc/amd: move verstage on PSP files to new psp_verstage folder 2024-01-26 19:02:58 +00:00
Kconfig src, util: Clean up makefile.inc in text, help & comments 2024-01-26 20:15:18 +00:00