From: Andreas Reichel <[email protected]> Check pointers before using them.
Signed-off-by: Andreas Reichel <[email protected]> --- env/env_config_file.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/env/env_config_file.c b/env/env_config_file.c index 3a802f2..83feab8 100644 --- a/env/env_config_file.c +++ b/env/env_config_file.c @@ -19,6 +19,10 @@ FILE *open_config_file(CONFIG_PART *cfgpart, char *mode) { char *configfilepath; + if (!cfgpart) + return NULL; + if (!cfgpart->mountpoint) + return NULL; configfilepath = (char *)malloc(strlen(FAT_ENV_FILENAME) + strlen(cfgpart->mountpoint) + 2); if (!configfilepath) { -- 2.15.0 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20171114132241.2161-2-andreas.reichel.ext%40siemens.com. For more options, visit https://groups.google.com/d/optout.
