On 2017-11-14 14:22, [ext] Andreas J. Reichel wrote:
> 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) {
>
Applied, but I reformatted this to make it consistent and more compact.
if (!cfgpart || !cfgpart->mountpoint) {
return NULL;
}
Jan
--
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/a8c8f03c-b877-ef6f-b247-6b1b6688d0d2%40siemens.com.
For more options, visit https://groups.google.com/d/optout.