summaryrefslogtreecommitdiff
path: root/debian/patches/0036-Add-a-missing-argument-check.patch
blob: 6956d56a4b102940679ef3aab546e8c6acb226be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Gaurav Gupta <g.gupta@samsung.com>
Date: Mon, 14 Jul 2014 16:08:28 +0800
Subject: Add a missing argument check

For https://bugzilla.gnome.org/show_bug.cgi?id=733042

the states argument of xmlRelaxNGAddStates() ought to be checked too
---
 relaxng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/relaxng.c b/relaxng.c
index 3d8524d..89fcc4e 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -1095,7 +1095,7 @@ xmlRelaxNGAddStates(xmlRelaxNGValidCtxtPtr ctxt,
 {
     int i;
 
-    if (state == NULL) {
+    if (state == NULL || states == NULL) {
         return (-1);
     }
     if (states->nbState >= states->maxState) {