]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/file.cpp
fixing overrelease and out-of-bounds write, fixes #13725
[wxWidgets.git] / src / common / file.cpp
index f9badf53953e01b49bf63101b2c546f9515fe950..e553b2c8335684745e81cfc636f69073b79fce4f 100644 (file)
@@ -302,7 +302,7 @@ bool wxFile::ReadAll(wxString *str, const wxMBConv& conv)
     char* p = buf.data();
     for ( ;; )
     {
-        static const unsigned READSIZE = 4096;
+        static const ssize_t READSIZE = 4096;
 
         ssize_t nread = Read(p, length > READSIZE ? READSIZE : length);
         if ( nread == wxInvalidOffset )