components/libxml2/patches/libxml2-Fix-potential-out-of-bound-access.patch
branchs11u1-sru
changeset 2571 9f80a44ee83a
equal deleted inserted replaced
2570:40da38c985e9 2571:9f80a44ee83a
       
     1 For Solaris 11.1 libxml 2.7.6 we had to modify context.
       
     2 
       
     3 From 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d Mon Sep 17 00:00:00 2001
       
     4 From: Daniel Veillard <[email protected]>
       
     5 Date: Mon, 29 Oct 2012 02:39:55 +0000
       
     6 Subject: Fix potential out of bound access
       
     7 
       
     8 ---
       
     9 diff --git a/parser.c b/parser.c
       
    10 index 0d8d7f2..bd634e9 100644
       
    11 --- a/parser.c
       
    12 +++ b/parser.c
       
    13 @@ -4076,7 +4076,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) {
       
    14  	c = CUR_CHAR(l);
       
    15      }
       
    16      if ((in_space) && (normalize)) {
       
    17 -        while (buf[len - 1] == 0x20) len--;
       
    18 +        while ((len > 0) && (buf[len - 1] == 0x20)) len--;
       
    19      }
       
    20      buf[len] = 0;
       
    21      if (RAW == '<') {
       
    22 --
       
    23 cgit v0.9.0.2