On 16.6.2014 17:40, Pavel Hrdina wrote:
On 16.6.2014 17:21, Peter Krempa wrote:
> The value is provided via environment and causes a crash if not defined.
> ---
> src/network/leaseshelper.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c
> index bf1842b..99c47a9 100644
> --- a/src/network/leaseshelper.c
> +++ b/src/network/leaseshelper.c
> @@ -181,7 +181,8 @@ main(int argc, char **argv)
> goto cleanup;
>
> /* Removed extraneous trailing space in DNSMASQ_LEASE_EXPIRES (dnsmasq <
2.52) */
> - if (exptime[strlen(exptime) - 1] == ' ')
> + if (exptime &&
> + exptime[strlen(exptime) - 1] == ' ')
> exptime[strlen(exptime) - 1] = '\0';
>
> /* Check if it is an IPv6 lease */
>
ACK
Pavel
I've missed the
s/leasehelper/leaseshelper/ in subject.