libDtHelp: Coverity 88440
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:40:12 +0000 (01:40 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:40:12 +0000 (01:40 +0100)
cde/lib/DtHelp/FileUtils.c

index 201e28f44bf0eb0bc55445cb8fdeaf8e93ad9106..5846dec2a247382e8f4ef6a87be2f9849ad5fd90 100644 (file)
@@ -179,7 +179,7 @@ _DtHelpFileTraceLinks (
    if ( NULL == *pPathName ) return False;         /* RETURN */
 
    /* init */
-   strcpy(buf[0],*pPathName);
+   snprintf(buf[0], sizeof(buf[0]), "%s", *pPathName);
    linkPath = buf[0];        /* will be assigned to filePath below */
    curBuf = 1;               /* next valid buf */