[libxml2] Adding a check in case of allocation error
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Adding a check in case of allocation error
- Date: Mon, 14 Jul 2014 08:02:14 +0000 (UTC)
commit 6d753994b9cdfccec5d0075d5685cae9ad06bec1
Author: Gaurav Gupta <g gupta samsung com>
Date: Mon Jul 14 16:01:10 2014 +0800
Adding a check in case of allocation error
For https://bugzilla.gnome.org/show_bug.cgi?id=733043
There is missing Null condition in xmlRelaxNGValidateInterleave of
relaxng.c
Dereferencing it may cause a crash.
relaxng.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/relaxng.c b/relaxng.c
index f34dc14..1ba4fba 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -9419,6 +9419,10 @@ xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt,
oldstate = ctxt->state;
for (i = 0; i < nbgroups; i++) {
ctxt->state = xmlRelaxNGCopyValidState(ctxt, oldstate);
+ if (ctxt->state == NULL) {
+ ret = -1;
+ break;
+ }
group = partitions->groups[i];
if (lasts[i] != NULL) {
last = lasts[i]->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]