Bugs item #2992089, was opened at 2010-04-25 20:12
Message generated for change (Tracker Item Submitted) made by ettlmartin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102915&aid=2992089&group_id=2915

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: orbitcowboy (ettlmartin)
Assigned to: Nobody/Anonymous (nobody)
Summary: [cppcheck] Dangerous usage of strncpy

Initial Comment:
during a check of the current trunk with the static code analysis tool 
cppcheck, the tool found an issue in :
plplot/drivers/pstex.c at line 71. Cppcheck printed the following message:

Dangerous usage of 'ofile' (strncpy doesn't always 0-terminate it)

Take a look at the source:
....
    strncpy( ofile, pls->FileName, 80 );
    strcat( ofile, "_t" );
...
after strncpy, the buffer needs to be zero terminated, the strcat can be called.

Best regards

Ettl Martin


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102915&aid=2992089&group_id=2915

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to