equal
deleted
inserted
replaced
|
1 From 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d Mon Sep 17 00:00:00 2001 |
|
2 From: Daniel Veillard <[email protected]> |
|
3 Date: Mon, 29 Oct 2012 02:39:55 +0000 |
|
4 Subject: Fix potential out of bound access |
|
5 |
|
6 --- |
|
7 diff --git a/parser.c b/parser.c |
|
8 index 0d8d7f2..bd634e9 100644 |
|
9 --- a/parser.c |
|
10 +++ b/parser.c |
|
11 @@ -4076,7 +4076,7 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt, int *attlen, int normalize) { |
|
12 goto error; |
|
13 |
|
14 if ((in_space) && (normalize)) { |
|
15 - while (buf[len - 1] == 0x20) len--; |
|
16 + while ((len > 0) && (buf[len - 1] == 0x20)) len--; |
|
17 } |
|
18 buf[len] = 0; |
|
19 if (RAW == '<') { |
|
20 -- |
|
21 cgit v0.9.0.2 |