coreboot/util/amdfwtool
Martin Roth 9411c6e7c7 util/amdfwtool: Fix NULL pointer dereference in fill_dir_header
Move the NULL pointer check to the beginning of the fill_dir_header function
before any dereference of the directory pointer. This prevents the potential
segmentation fault that could occur if directory is NULL.

This fixes CID 1540835 - Dereference before null check (REVERSE_NULL).

Change-Id: I12bb146d59839381478034f974b7d408f92ae677
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88617
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-08-02 01:46:47 +00:00
..
.gitignore
amdfwread.c
amdfwtool.c util/amdfwtool: Fix NULL pointer dereference in fill_dir_header 2025-08-02 01:46:47 +00:00
amdfwtool.h
data_parse.c util/amdfwtool: Add binary parsing 2025-07-17 20:38:52 +00:00
description.md util: Add description.md to each util 2018-07-26 13:26:50 +00:00
handle_file.c
Makefile amdfwtool: Use Makefile.mk for Makefile settings 2024-02-29 02:24:09 +00:00
Makefile.mk
opts.c
signed_psp.c