1 From 921e332134620b5b34e3a182fde1dd8d2c15153a Mon Sep 17 00:00:00 2001
2 From: "Alfred M. Szmidt" <ams@gnu.org>
3 Date: Mon, 10 Jul 2017 20:08:00 +0000
4 Subject: [PATCH 25/60] src/hostname.c (set_name): Handle case when
10 2 files changed, 6 insertions(+), 1 deletion(-)
12 diff --git a/ChangeLog b/ChangeLog
13 index 72fa48bf..289a6e9f 100644
17 +2017-07-10 Omer Anson <oaanson@gmail.com> (tiny change)
19 + * src/hostname.c (set_name): Handle case when hostname_new is
22 2017-07-10 Omer Anson <oaanson@gmail.com> (tiny change)
24 * ftpd/ftpd.c (options) <max-timeout>: Mention mandatory argument.
25 diff --git a/src/hostname.c b/src/hostname.c
26 index 6837fd5a..d1f584f8 100644
29 @@ -232,7 +232,7 @@ set_name (const hostname_arguments *const args)
31 hostname_new = args->hostname_new;
33 - size = strlen (hostname_new);
34 + size = hostname_new ? strlen (hostname_new) : 0;
36 error (EXIT_FAILURE, 0, "Empty hostname");
39 2.26.0.292.g33ef6b2f38