[libxml2] Fix a potential NULL dereference in tree code
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix a potential NULL dereference in tree code
- Date: Wed, 11 Sep 2013 07:12:42 +0000 (UTC)
commit 75d13092f2886176fa8e8f354eb8a0e51f7409fd
Author: Daniel Veillard <veillard redhat com>
Date: Wed Sep 11 15:11:27 2013 +0800
Fix a potential NULL dereference in tree code
https://bugzilla.gnome.org/show_bug.cgi?id=707750
Also reported by Gaurav, simple fix to check the pointer before
dereference
tree.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tree.c b/tree.c
index 7981771..b517a2c 100644
--- a/tree.c
+++ b/tree.c
@@ -9785,7 +9785,8 @@ leave_node:
if (clone->parent != NULL)
clone->parent->last = clone;
clone = clone->parent;
- parentClone = clone->parent;
+ if (clone != NULL)
+ parentClone = clone->parent;
/*
* Process parent --> next;
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]