From: Peter Howkins Date: Wed, 4 Jul 2018 01:18:20 +0000 (+0100) Subject: dtdocbook: Coverity 86683 X-Git-Tag: 2.3.0a~195 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=160728d8953d208cfef04662c50d9c99da669e88;p=oweals%2Fcde.git dtdocbook: Coverity 86683 --- 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;