]> git.saurik.com Git - wxWidgets.git/commitdiff
Blind fix for bug #1209944, wxFileConfig constructor corrupts the stack
authorRobin Dunn <robin@alldunn.com>
Mon, 30 May 2005 18:50:26 +0000 (18:50 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 30 May 2005 18:50:26 +0000 (18:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/fileconf.cpp

index 639e9b089e8e483d6de1721d9c7d242e50582b30..e26936b7a53f9fade04c545232ee16a21c01dd4d 100644 (file)
@@ -495,7 +495,7 @@ wxFileConfig::wxFileConfig(wxInputStream &inStream, wxMBConv& conv)
         char buf[1024];
         do
         {
-            inStream.Read(buf, WXSIZEOF(buf));
+            inStream.Read(buf, WXSIZEOF(buf)-1);  // leave room for the NULL
 
             const wxStreamError err = inStream.GetLastError();