From: Damien Neil Date: Tue, 8 Aug 2000 18:08:05 +0000 (+0000) Subject: To print a non-NUL terminated string, use "%.*s", not "%*s". Fixed. X-Git-Tag: V3-BETA-2-PATCH-1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bd0368aa94892749a2598ace940e28daa41ec28;p=thirdparty%2Fdhcp.git To print a non-NUL terminated string, use "%.*s", not "%*s". Fixed. --- diff --git a/dhcpctl/test.c b/dhcpctl/test.c index 219cf1f6e..0b8901865 100644 --- a/dhcpctl/test.c +++ b/dhcpctl/test.c @@ -169,7 +169,7 @@ option domain-name-servers 10.0.0.1, 10.0.0.2;", exit (1); } - printf ("group name = %*s\n", groupname -> len, groupname -> value); + printf ("group name = %.*s\n", groupname -> len, groupname -> value); memset (&host_handle, 0, sizeof host_handle); status = dhcpctl_new_object (&host_handle, connection, "host"); @@ -327,7 +327,7 @@ option smtp-server 10.0.0.1;", exit (1); } - printf ("host name = %*s\n", result -> len, result -> value); + printf ("host name = %.*s\n", result -> len, result -> value); #if 0 status = dhcpctl_object_remove (connection, host_handle);