MantisBT - CMake
View Issue Details
0009267CMakeCMakepublic2009-07-13 14:422011-06-06 18:25
Andrey Rahmatullin 
Bill Hoffman 
normalmajoralways
closedduplicate 
CMake-2-6 
CMake 2.8.4 
0009267: Buffer overflows in SystemInformation.cxx
In file included from /usr/include/stdio.h:913,
                 from /home/wrar/tmp/BUILD/cmake-2.6.4/Source/kwsys/SystemInformation.cxx:68:
In function 'int sprintf(char*, const char*, ...)',
    inlined from 'bool cmsys::SystemInformationImplementation::RetrieveClassicalCPUIdentity()' at /home/wrar/tmp/BUILD/cmake-2.6.4/Source/kw
sys/SystemInformation.cxx:1899:
/usr/include/bits/stdio2.h:35: warning: call to int __builtin___sprintf_chk(char*, int, unsigned int, const char*, ...) will always overflow
 destination buffer
In function 'int sprintf(char*, const char*, ...)',
    inlined from 'bool cmsys::SystemInformationImplementation::RetrieveClassicalCPUIdentity()' at /home/wrar/tmp/BUILD/cmake-2.6.4/Source/kw
sys/SystemInformation.cxx:1900:
/usr/include/bits/stdio2.h:35: warning: call to int __builtin___sprintf_chk(char*, int, unsigned int, const char*, ...) will always overflow
 destination buffer
In function 'int sprintf(char*, const char*, ...)',
    inlined from 'bool cmsys::SystemInformationImplementation::RetrieveClassicalCPUIdentity()' at /home/wrar/tmp/BUILD/cmake-2.6.4/Source/kw
sys/SystemInformation.cxx:1901:
/usr/include/bits/stdio2.h:35: warning: call to int __builtin___sprintf_chk(char*, int, unsigned int, const char*, ...) will always overflow
 destination buffer

That's because string literals in lines 1899..1901 are longer than CHIPNAME_STRING_LENGTH.
No tags attached.
duplicate of 0011018closed Ben Boeckel CMake compilation fails with buffer overflow detected 
Issue History
2009-07-13 14:42Andrey RahmatullinNew Issue
2009-09-14 12:30Bill HoffmanNote Added: 0017432
2009-09-14 12:30Bill HoffmanStatusnew => assigned
2009-09-14 12:30Bill HoffmanAssigned To => Bill Hoffman
2009-09-14 16:20Andrey RahmatullinNote Added: 0017487
2009-09-14 16:20Andrey RahmatullinNote Added: 0017488
2009-09-14 16:20Andrey RahmatullinNote Deleted: 0017488
2009-11-16 11:47Andrey RahmatullinNote Added: 0018445
2011-02-03 18:53David ColeNote Added: 0025266
2011-02-03 18:53David ColeRelationship addedduplicate of 0011018
2011-02-03 18:53David ColeStatusassigned => resolved
2011-02-03 18:53David ColeFixed in Version => CMake 2.8.4
2011-02-03 18:53David ColeResolutionopen => duplicate
2011-06-06 18:25David ColeStatusresolved => closed
2011-06-06 18:25David ColeNote Added: 0026696

Notes
(0017432)
Bill Hoffman   
2009-09-14 12:30   
It is 48+1 in CVS CMake, those strings are only about 20 chars long, should fit...
(0017487)
Andrey Rahmatullin   
2009-09-14 16:20   
Those strings are 54+1, 57+1 and 61+1 in 2.6.4.
(0018445)
Andrey Rahmatullin   
2009-11-16 11:47   
In 2.8.0 they are the same as in 2.6.4, so I don't know what were you speaking about.
(0025266)
David Cole   
2011-02-03 18:53   
There was another bug report on this one, too, and it is fixed in 2.8.4.
(0026696)
David Cole   
2011-06-06 18:25   
Closing resolved issues that have not been updated in more than 3 months.