diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2004-06-17 17:37:09 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2004-06-17 17:37:09 +0000 |
| commit | 3c055ba1f3974f897500decae49f925bb7385f49 (patch) | |
| tree | f9beb92d4c4016ff2cf4fc2ce9ffca9ccdca7184 /src/cppunit/TestPath.cpp | |
| parent | 5c9ce8e024326a9dc71c67463f0f75fbf8daed07 (diff) | |
| download | cppunit-3c055ba1f3974f897500decae49f925bb7385f49.tar.gz | |
src/cppunit/TestPath.cpp: bug #938753, array bound read in
splitPathString() with substr if an empty string is passed.
Diffstat (limited to 'src/cppunit/TestPath.cpp')
| -rw-r--r-- | src/cppunit/TestPath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cppunit/TestPath.cpp b/src/cppunit/TestPath.cpp index 2f4903f..6a73b43 100644 --- a/src/cppunit/TestPath.cpp +++ b/src/cppunit/TestPath.cpp @@ -226,7 +226,7 @@ bool TestPath::splitPathString( const std::string &pathAsString, PathTestNames &testNames ) { - bool isRelative = (pathAsString.substr(0,1) != "/"); + bool isRelative = pathAsString.length() && pathAsString[0] != "/"; int index = (isRelative ? 0 : 1); while ( true ) |
