File libxml2-CVE-2012-5134.patch of Package libxml2.1604

From 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Mon, 29 Oct 2012 02:39:55 +0000
Subject: Fix potential out of bound access

---
Index: libxml2-2.8.0/parser.c
===================================================================
--- libxml2-2.8.0.orig/parser.c	2012-05-18 09:30:30.000000000 +0200
+++ libxml2-2.8.0/parser.c	2012-12-07 12:00:57.111732279 +0100
@@ -3931,7 +3931,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr
 	c = CUR_CHAR(l);
     }
     if ((in_space) && (normalize)) {
-        while (buf[len - 1] == 0x20) len--;
+        while ((len > 0) && (buf[len - 1] == 0x20)) len--;
     }
     buf[len] = 0;
     if (RAW == '<') {
openSUSE Build Service is sponsored by