MantisBT - CMake
View Issue Details
0015738CMakeCMakepublic2015-09-12 12:372016-02-01 09:10
Thomas Klausner 
Brad King 
normalminoralways
closedfixed 
x86_64NetBSD7.99.22
CMake 3.3 
CMake 3.4CMake 3.4 
0015738: printw() should use format string
Multiple files (in Source/CursesDialog/*.cxx) use the printw() function without a format string, i.e.
printw(some_variable);
This is unsafe; if some_variable contains "%s" or similar, you have problems.

Please use the
printw("%s", some_variable);
idiom instead.
Code inspection.
The attached patch fixes this issue.
No tags attached.
diff printw.diff (2,900) 2015-09-12 12:37
https://public.kitware.com/Bug/file/5522/printw.diff
Issue History
2015-09-12 12:37Thomas KlausnerNew Issue
2015-09-12 12:37Thomas KlausnerFile Added: printw.diff
2015-09-14 09:39Brad KingNote Added: 0039413
2015-09-14 09:52Brad KingNote Added: 0039414
2015-09-14 09:52Brad KingAssigned To => Brad King
2015-09-14 09:52Brad KingStatusnew => resolved
2015-09-14 09:52Brad KingResolutionopen => fixed
2015-09-14 09:52Brad KingFixed in Version => CMake 3.4
2015-09-14 09:52Brad KingTarget Version => CMake 3.4
2015-09-16 08:44Brad KingNote Added: 0039428
2016-02-01 09:10Robert MaynardNote Added: 0040406
2016-02-01 09:10Robert MaynardStatusresolved => closed

Notes
(0039413)
Brad King   
2015-09-14 09:39   
For reference, this patch was also submitted to the mailing list:

 Portability patches / bug fixes
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/14349 [^]
(0039414)
Brad King   
2015-09-14 09:52   
Patch (from list) applied:

 ccmake: Pass format string to 'printw'
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=acd9b4d3 [^]
(0039428)
Brad King   
2015-09-16 08:44   
Patch revised to avoid passing ""-literals to "char*":

 ccmake: Pass format string to 'printw'
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c442e5a [^]
(0040406)
Robert Maynard   
2016-02-01 09:10   
Closing resolved issues that have not been updated in more than 4 months.