summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAnton Moryakov <[email protected]>2026-02-27 00:27:28 +0300
committerTom Rini <[email protected]>2026-03-13 13:22:01 -0600
commit21edd76aded65d566f20a6937495c0c3965b4063 (patch)
treedc8c7d38ff5ba1fe687b7d614128060cfeaf3f15 /scripts
parent660d8e4fe92e4ca3f2173e3d00a25f6ae5f6e97d (diff)
linux_compat: fix NULL pointer dereference in get_mem()
Add NULL check after memalign() call in get_mem() to prevent potential NULL pointer dereference (CWE-476). The function memalign() can return NULL on allocation failure. Dereferencing the returned pointer without checking for NULL may cause a crash in low-memory conditions. Changes: - Add NULL check after memalign() allocation - Return NULL on failure, consistent with function semantics This fixes the static analyzer warning: linux_compat.c:34: dereference of memalign return value without NULL check Reported-by: static analyzer Svace Signed-off-by: Anton Moryakov <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions