Author: weiden
Date: Sat Jul 28 16:48:02 2007
New Revision: 27947
URL:
http://svn.reactos.org/svn/reactos?rev=27947&view=rev
Log:
Fix stack corruption
Modified:
trunk/rosapps/downloader/xml.c
Modified: trunk/rosapps/downloader/xml.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/xml.c?rev=27947…
==============================================================================
--- trunk/rosapps/downloader/xml.c (original)
+++ trunk/rosapps/downloader/xml.c Sat Jul 28 16:48:02 2007
@@ -190,8 +190,7 @@
size_t len = fread (buffer, 1, sizeof(buffer), file);
done = len < sizeof(buffer);
- buffer[len] = 0;
- if(!XML_Parse(parser, buffer, len, done))
+ if(len > 0 && !XML_Parse(parser, buffer, len, done))
{
MessageBoxW(0,Strings[IDS_XMLERROR_2],0,0);
return FALSE;