libDtHelp: Coverity 88665
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:36:03 +0000 (01:36 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:36:03 +0000 (01:36 +0100)
cde/lib/DtHelp/Environ_c.c

index 00792d98df3dfeb0b97adb346f78ddaa56699c4c..516278db7306759a6a907f80ca54f7ea458bfd9b 100644 (file)
@@ -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;