Name of user not set #1003143 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48531 )
Change subject: lib/fmap: Add null parameters handling ......................................................................
lib/fmap: Add null parameters handling
Prevent segmentation fault when passing NULL as parameters.
Signed-off-by: Jakub Czapiga jacz@semihalf.com Change-Id: Ie712d040b1c2383dcc8884e5f779c3591ccf0163 --- M src/lib/fmap.c 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/48531/1
diff --git a/src/lib/fmap.c b/src/lib/fmap.c index 2abe138..418e715 100644 --- a/src/lib/fmap.c +++ b/src/lib/fmap.c @@ -164,6 +164,9 @@ struct region_device fmrd; size_t offset;
+ if (name == NULL || ar == NULL) + return -1; + if (find_fmap_directory(&fmrd)) return -1;
@@ -206,6 +209,9 @@ struct region_device fmrd; size_t offset;
+ if (name == NULL || ar == NULL) + return -1; + if (find_fmap_directory(&fmrd)) return -1;