Revision: 7482
http://winmerge.svn.sourceforge.net/winmerge/?rev=7482&view=rev
Author: gerundt
Date: 2010-12-28 20:27:05 +0000 (Tue, 28 Dec 2010)
Log Message:
-----------
Fix possible access beyond end of memory mapped file
Modified Paths:
--------------
branches/R2_14/Src/codepage_detect.cpp
Modified: branches/R2_14/Src/codepage_detect.cpp
===================================================================
--- branches/R2_14/Src/codepage_detect.cpp 2010-12-27 16:10:52 UTC (rev 7481)
+++ branches/R2_14/Src/codepage_detect.cpp 2010-12-28 20:27:05 UTC (rev 7482)
@@ -223,7 +223,7 @@
encoding->m_bom = true;
break;
default:
- if (fi.pImage && !CheckForInvalidUtf8((LPBYTE)fi.pImage, 4096))
+ if (fi.pImage && !CheckForInvalidUtf8((LPBYTE)fi.pImage, fi.cbImage))
encoding->SetUnicoding(ucr::UTF8);
encoding->m_bom = false;
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|