diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2004-06-17 18:16:49 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2004-06-17 18:16:49 +0000 |
| commit | e9f2d7bcb6cc12025e6eedc2e89f928d1bbae70d (patch) | |
| tree | 3384396cfef567aaeb2433b373f65e721e36bfc3 /src/cppunit/TestPath.cpp | |
| parent | f29095da66d810684c4e533ad506b109878e874d (diff) | |
| download | cppunit-e9f2d7bcb6cc12025e6eedc2e89f928d1bbae70d.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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cppunit/TestPath.cpp b/src/cppunit/TestPath.cpp index 5ff1466..a2783a2 100644 --- a/src/cppunit/TestPath.cpp +++ b/src/cppunit/TestPath.cpp @@ -226,7 +226,10 @@ bool TestPath::splitPathString( const std::string &pathAsString, PathTestNames &testNames ) { - bool isRelative = pathAsString.length() && pathAsString[0] != '/'; + if ( pathAsString.empty() ) + return true; + + bool isRelative = pathAsString[0] != '/'; int index = (isRelative ? 0 : 1); while ( true ) |
