From: Volker Lendecke Date: Tue, 9 Feb 2021 11:26:20 +0000 (+0100) Subject: rpc_server: Fix a -Werror=format-truncation error X-Git-Tag: tevent-0.11.0~1524 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e3f0fa34b47a2dbf910c0942276b3ec06fdab6c;p=thirdparty%2Fsamba.git rpc_server: Fix a -Werror=format-truncation error gcc gets this wrong, it believes %u can write up to "2147483647" (2^31-1). Silence this with an easy patch. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/rpc_server/rpc_sock_helper.c b/source3/rpc_server/rpc_sock_helper.c index 4b998962c8e..5756a891544 100644 --- a/source3/rpc_server/rpc_sock_helper.c +++ b/source3/rpc_server/rpc_sock_helper.c @@ -160,7 +160,7 @@ static NTSTATUS dcesrv_create_ncacn_ip_tcp_sockets( int **pfds) { uint16_t port = 0; - char port_str[6]; + char port_str[11]; const char *endpoint = NULL; size_t i = 0, num_fds; int *fds = NULL;