[cmake-developers] [CMake 0014176]: passing long paths via env var CMAKE_LIBRARY_PATH or CMAKE_INCLUDE_PATH makes cmake segfault

Mantis Bug Tracker mantis at public.kitware.com
Tue May 28 10:34:55 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14176 
====================================================================== 
Reported By:                YYrhs
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14176
Category:                   CMake
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-05-28 10:34 EDT
Last Modified:              2013-05-28 10:34 EDT
====================================================================== 
Summary:                    passing long paths via env var CMAKE_LIBRARY_PATH or
CMAKE_INCLUDE_PATH makes cmake segfault
Description: 
I passed maybe 20 paths separated by ' ' instead of ':' by accident.
The result was cmSystemTools::FileIsDirectory segfaulting because memcpy does
not check that the strlen(name) is smaller than MAX_PATH.

The fix is trivial: print a warning and return false in that case or such
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-05-28 10:34 YYrhs          New Issue                                    
======================================================================




More information about the cmake-developers mailing list