From: Peter Howkins Date: Wed, 4 Jul 2018 00:36:03 +0000 (+0100) Subject: libDtHelp: Coverity 88665 X-Git-Tag: 2.3.0a~211 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a7e09ae1c320ac572543463b0d15139e005de075;p=oweals%2Fcde.git libDtHelp: Coverity 88665 --- diff --git a/cde/lib/DtHelp/Environ_c.c b/cde/lib/DtHelp/Environ_c.c index 00792d98..516278db 100644 --- a/cde/lib/DtHelp/Environ_c.c +++ b/cde/lib/DtHelp/Environ_c.c @@ -107,7 +107,7 @@ char * _DtCliSrvGetDtUserSession(void) { char * s = strchr(display,':'); if (s && strlen(s) < (size_t)BUFSIZ) { - strcpy(screen,s+1); + snprintf(screen, sizeof(screen), "%s", s + 1); *s = 0; if ((s = strchr(screen,'.')) && *(s+1) == '0') *s = 0;