summaryrefslogtreecommitdiff
path: root/debian/patches/0030-Avoid-Possible-null-pointer-dereference-in-memory-de.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0030-Avoid-Possible-null-pointer-dereference-in-memory-de.patch')
-rw-r--r--debian/patches/0030-Avoid-Possible-null-pointer-dereference-in-memory-de.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/0030-Avoid-Possible-null-pointer-dereference-in-memory-de.patch b/debian/patches/0030-Avoid-Possible-null-pointer-dereference-in-memory-de.patch
new file mode 100644
index 0000000..8a84731
--- /dev/null
+++ b/debian/patches/0030-Avoid-Possible-null-pointer-dereference-in-memory-de.patch
@@ -0,0 +1,32 @@
+From: Gaurav <g.gupta@samsung.com>
+Date: Fri, 9 May 2014 17:00:08 +0800
+Subject: Avoid Possible null pointer dereference in memory debug mode
+
+Fix a use before check on pointer
+For https://bugzilla.gnome.org/show_bug.cgi?id=729849
+---
+ xmlmemory.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/xmlmemory.c b/xmlmemory.c
+index 25d9318..37dcf3b 100644
+--- a/xmlmemory.c
++++ b/xmlmemory.c
+@@ -583,13 +583,15 @@ xmlMemBlocks(void) {
+ static void
+ xmlMemContentShow(FILE *fp, MEMHDR *p)
+ {
+- int i,j,k,len = p->mh_size;
+- const char *buf = (const char *) HDR_2_CLIENT(p);
++ int i,j,k,len;
++ const char *buf;
+
+ if (p == NULL) {
+ fprintf(fp, " NULL");
+ return;
+ }
++ len = p->mh_size;
++ buf = (const char *) HDR_2_CLIENT(p);
+
+ for (i = 0;i < len;i++) {
+ if (buf[i] == 0) break;