OSDN Git Service
(root)
/
winmerge-jp
/
winmerge-jp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09b8d06
)
DirTravel.cpp: avoid accessing String out of bound
author
sdottaka
<sdottaka@sourceforge.net>
Sat, 26 Jul 2014 03:02:47 +0000
(12:02 +0900)
committer
sdottaka
<sdottaka@sourceforge.net>
Sat, 26 Jul 2014 03:02:47 +0000
(12:02 +0900)
--HG--
branch : stable
Src/DirTravel.cpp
patch
|
blob
|
history
diff --git
a/Src/DirTravel.cpp
b/Src/DirTravel.cpp
index
e46aa98
..
45163ee
100644
(file)
--- a/
Src/DirTravel.cpp
+++ b/
Src/DirTravel.cpp
@@
-81,7
+81,7
@@
static void LoadFiles(const String& sDir, DirItemArray * dirs, DirItemArray * fi
#else
String sPattern(sDir);
size_t len = sPattern.length();
- if (sPattern[len - 1] != '\\')
+ if (
len &&
sPattern[len - 1] != '\\')
sPattern += _T("\\*.*");
else
sPattern += _T("*.*");