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:
e01b26a
)
unicoder.cpp: Fix crash when comparing files that the size of the file is less than...
author
sdottaka
<sdottaka@sourceforge.net>
Thu, 22 May 2014 17:37:01 +0000
(
02:37
+0900)
committer
sdottaka
<sdottaka@sourceforge.net>
Thu, 22 May 2014 17:37:01 +0000
(
02:37
+0900)
--HG--
branch : stable
Src/Common/unicoder.cpp
patch
|
blob
|
history
diff --git
a/Src/Common/unicoder.cpp
b/Src/Common/unicoder.cpp
index
52b54f1
..
254dfdd
100644
(file)
--- a/
Src/Common/unicoder.cpp
+++ b/
Src/Common/unicoder.cpp
@@
-1168,6
+1168,8
@@
bool CheckForInvalidUtf8(const char *pBuffer, size_t size)
return true;
pVal2++;
}
+ if (size <= 3)
+ return false;
pVal2 = (unsigned char *)pBuffer;
bool bUTF8 = false;
for (int i = 0; i < (size - 3); ++i)