commit | 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d | [log] [tgz] |
---|---|---|
author | Daniel Veillard <veillard@redhat.com> | Mon Oct 29 10:39:55 2012 +0800 |
committer | Daniel Veillard <veillard@redhat.com> | Mon Oct 29 10:39:55 2012 +0800 |
tree | 71ab4e06fda67e38a1a7a51ef25b609c89f87ea3 | |
parent | 4ea74a440d6f7ff0f6e2d25a780aee21f86762a8 [diff] |
Fix potential out of bound access
diff --git a/parser.c b/parser.c index 0d8d7f2..bd634e9 100644 --- a/parser.c +++ b/parser.c
@@ -4076,7 +4076,7 @@ goto error; if ((in_space) && (normalize)) { - while (buf[len - 1] == 0x20) len--; + while ((len > 0) && (buf[len - 1] == 0x20)) len--; } buf[len] = 0; if (RAW == '<') {