[cmake-commits] king committed cmFindLibraryCommand.cxx 1.47 1.48
cmFindPathCommand.cxx 1.39 1.40
cmake-commits at cmake.org
cmake-commits at cmake.org
Sun Jan 20 19:29:14 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv343/Source
Modified Files:
cmFindLibraryCommand.cxx cmFindPathCommand.cxx
Log Message:
BUG: Fix previous commit to not access empty strings out of bounds.
Index: cmFindPathCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPathCommand.cxx,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- cmFindPathCommand.cxx 20 Jan 2008 22:24:46 -0000 1.39
+++ cmFindPathCommand.cxx 21 Jan 2008 00:29:12 -0000 1.40
@@ -106,7 +106,7 @@
i != this->SearchPaths.end(); ++i)
{
std::string& p = *i;
- if(p[p.size()-1] != '/')
+ if(p.empty() || p[p.size()-1] != '/')
{
p += "/";
}
Index: cmFindLibraryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindLibraryCommand.cxx,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- cmFindLibraryCommand.cxx 20 Jan 2008 22:41:14 -0000 1.47
+++ cmFindLibraryCommand.cxx 21 Jan 2008 00:29:12 -0000 1.48
@@ -186,7 +186,7 @@
i != this->SearchPaths.end(); ++i)
{
std::string& p = *i;
- if(p[p.size()-1] != '/')
+ if(p.empty() || p[p.size()-1] != '/')
{
p += "/";
}
More information about the Cmake-commits
mailing list