MantisBT - CMake
View Issue Details
0014882CMakeCPackpublic2014-04-16 12:472014-10-06 10:33
Orion Poplawski 
Brad King 
normalminorhave not tried
closedfixed 
LinuxFedora20
CMake 2.8.12.2 
CMake 3.0CMake 3.0 
0014882: cmake: strlen(): cpack killed by SIGSEGV
Fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1088321 [^]

Apparently std::string += NULL results in a segfault. No checks are done in cmArchiveWrite that archive_error_string() does not return NULL:

This is where this is happening (line 294 in 2.8.12.2):

    if(archive_write_data(this->Archive, buffer, nnext) != nnext_s)
      {
      this->Error = "archive_write_data: ";
      this->Error += archive_error_string(this->Archive);
      return false;
      }

We're running with libarchive 3.1.2
No tags attached.
Issue History
2014-04-16 12:47Orion PoplawskiNew Issue
2014-04-16 13:14Brad KingNote Added: 0035729
2014-04-17 10:09Brad KingNote Added: 0035736
2014-04-17 10:09Brad KingAssigned To => Brad King
2014-04-17 10:09Brad KingStatusnew => resolved
2014-04-17 10:09Brad KingResolutionopen => fixed
2014-04-17 10:09Brad KingFixed in Version => CMake 3.0
2014-04-17 10:09Brad KingTarget Version => CMake 3.0
2014-10-06 10:33Robert MaynardNote Added: 0036980
2014-10-06 10:33Robert MaynardStatusresolved => closed

Notes
(0035729)
Brad King   
2014-04-16 13:14   
Ugh, thanks. This should fix it:

 cmArchiveWrite: Handle NULL error string
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b508de59 [^]
(0035736)
Brad King   
2014-04-17 10:09   
The change in 0014882:0035729 has been merged to the 'release' branch in preparation for 3.0.0-rc4.
(0036980)
Robert Maynard   
2014-10-06 10:33   
Closing resolved issues that have not been updated in more than 4 months.