From 160728d8953d208cfef04662c50d9c99da669e88 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Wed, 4 Jul 2018 02:18:20 +0100 Subject: [PATCH] dtdocbook: Coverity 86683 --- cde/programs/dtdocbook/tcl/tclUnixSock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtdocbook/tcl/tclUnixSock.c b/cde/programs/dtdocbook/tcl/tclUnixSock.c index 59cb4124..606f1ca8 100644 --- a/cde/programs/dtdocbook/tcl/tclUnixSock.c +++ b/cde/programs/dtdocbook/tcl/tclUnixSock.c @@ -77,9 +77,9 @@ Tcl_GetHostName(void) if (uname(&u) > -1) { hp = gethostbyname(u.nodename); if (hp != NULL) { - strcpy(hostname, hp->h_name); + snprintf(hostname, sizeof(hostname), "%s", hp->h_name); } else { - strcpy(hostname, u.nodename); + snprintf(hostname, sizeof(hostname), "%s", u.nodename); } hostnameInited = 1; return hostname; -- 2.25.1