overrun of static array
authorChristoph von Wittich <christoph_vw@reactos.org>
Tue, 23 Sep 2008 08:04:57 +0000 (08:04 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Tue, 23 Sep 2008 08:04:57 +0000 (08:04 +0000)
Fix for Coverity error CID: 529

svn path=/trunk/; revision=36418

reactos/base/applications/notepad/text.c

index 3b6fe23..768cd6a 100644 (file)
@@ -317,7 +317,7 @@ done:
 BOOL WriteText(HANDLE hFile, LPCWSTR pszText, DWORD dwTextLen, int iEncoding, int iEoln)
 {
   WCHAR wcBom;
-  BYTE bEoln[1];
+  BYTE bEoln[2];
   LPBYTE pbEoln = NULL;
   DWORD dwDummy, dwPos, dwNext, dwEolnSize = 0;