doc/util/dbtoman: Coverity 88244
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 01:07:10 +0000 (02:07 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 01:07:10 +0000 (02:07 +0100)
cde/doc/util/dbtoman/instant/tables.c

index 73a0dcc6178da9e5105f53d8a371cdacdcf8999e..7c223e3e77029b52dba06aa41ec39595ae1a8186 100644 (file)
@@ -1874,7 +1874,9 @@ TblDoSpanSpec(Element_t * ep,             /* element containing spanspec stuff */
 
        Calloc(1, tssp, struct tblspanspec);
 
-       if ( cp = FindAttValByName(ep, "SPANNAME") ) strcpy(tssp->name, cp);
+       if ( cp = FindAttValByName(ep, "SPANNAME") ) {
+               snprintf(tssp->name, sizeof(tssp->name), "%s", cp);
+       }
        tssp->source = source;
 
        if ( cp = FindAttValByName(ep, "NAMEST") )      {