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> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| amdfwread.c | ||
| amdfwtool.c | ||
| amdfwtool.h | ||
| data_parse.c | ||
| description.md | ||
| handle_file.c | ||
| Makefile | ||
| Makefile.mk | ||
| opts.c | ||
| signed_psp.c | ||