Thomas Faller : msxml3: Fix invalid read.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Sep 2 10:23:15 CDT 2015


Module: wine
Branch: master
Commit: f259ba33bb4b7f2a4a0bbf70063c4bef3d605709
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f259ba33bb4b7f2a4a0bbf70063c4bef3d605709

Author: Thomas Faller <tfaller1 at gmx.de>
Date:   Tue Sep  1 14:25:51 2015 +0200

msxml3: Fix invalid read.

---

 dlls/msxml3/saxreader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index 3b5bd7c..2b087bc 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -690,12 +690,13 @@ static void format_error_message_from_id(saxlocator *This, HRESULT hr)
 static void update_position(saxlocator *This, BOOL fix_column)
 {
     const xmlChar *p = This->pParserCtxt->input->cur-1;
+    const xmlChar *baseP = This->pParserCtxt->input->base;
 
     This->line = xmlSAX2GetLineNumber(This->pParserCtxt);
     if(fix_column)
     {
         This->column = 1;
-        for(; *p!='\n' && *p!='\r' && p>=This->pParserCtxt->input->base; p--)
+        for(;p>=baseP && *p!='\n' && *p!='\r'; p--)
             This->column++;
     }
     else




More information about the wine-cvs mailing list