bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] [PATCH] Verify name is allocated in hostname.c/parse


From: Giuseppe Scrivano
Subject: Re: [bug-inetutils] [PATCH] Verify name is allocated in hostname.c/parse_args
Date: Tue, 20 Jun 2017 12:01:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Omer Anson <address@hidden> writes:

> diff --git a/src/hostname.c b/src/hostname.c
> index e6a90f7..84d0444 100644
> --- a/src/hostname.c
> +++ b/src/hostname.c
> @@ -416,5 +416,7 @@ parse_file (const char *const file_name)
>  
>    free (buffer);
>    fclose (file);
> +  if (name == NULL)
> +    error(EXIT_FAILURE, 0, "parse_file");

nit: space between 'error' and '('.

Regards,
Giuseppe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]