diff options
Diffstat (limited to 'meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch')
-rw-r--r-- | meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch b/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch deleted file mode 100644 index c60e32f656..0000000000 --- a/meta/recipes-core/libxml/libxml2/libxml2-fix_NULL_pointer_derefs.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | libxml2-2.9.4: Fix more NULL pointer derefs | ||
2 | |||
3 | xpointer: Fix more NULL pointer derefs | ||
4 | |||
5 | Upstream-Status: Backport [https://git.gnome.org/browse/libxml2/commit/?id=e905f08123e4a6e7731549e6f09dadff4cab65bd] | ||
6 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | ||
7 | Signed-off-by: Pascal Bach <pascal.bach@siemens.com> | ||
8 | |||
9 | diff --git a/xpointer.c b/xpointer.c | ||
10 | index 676c510..074db24 100644 | ||
11 | --- a/xpointer.c | ||
12 | +++ b/xpointer.c | ||
13 | @@ -555,7 +555,7 @@ xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end) { | ||
14 | /* | ||
15 | * Empty set ... | ||
16 | */ | ||
17 | - if (end->nodesetval->nodeNr <= 0) | ||
18 | + if ((end->nodesetval == NULL) || (end->nodesetval->nodeNr <= 0)) | ||
19 | return(NULL); | ||
20 | break; | ||
21 | default: | ||
22 | @@ -1400,7 +1400,7 @@ xmlXPtrEval(const xmlChar *str, xmlXPathContextPtr ctx) { | ||
23 | */ | ||
24 | xmlNodeSetPtr set; | ||
25 | set = tmp->nodesetval; | ||
26 | - if ((set->nodeNr != 1) || | ||
27 | + if ((set == NULL) || (set->nodeNr != 1) || | ||
28 | (set->nodeTab[0] != (xmlNodePtr) ctx->doc)) | ||
29 | stack++; | ||
30 | } else | ||
31 | @@ -2073,9 +2073,11 @@ xmlXPtrRangeFunction(xmlXPathParserContextPtr ctxt, int nargs) { | ||
32 | xmlXPathFreeObject(set); | ||
33 | XP_ERROR(XPATH_MEMORY_ERROR); | ||
34 | } | ||
35 | - for (i = 0;i < oldset->locNr;i++) { | ||
36 | - xmlXPtrLocationSetAdd(newset, | ||
37 | - xmlXPtrCoveringRange(ctxt, oldset->locTab[i])); | ||
38 | + if (oldset != NULL) { | ||
39 | + for (i = 0;i < oldset->locNr;i++) { | ||
40 | + xmlXPtrLocationSetAdd(newset, | ||
41 | + xmlXPtrCoveringRange(ctxt, oldset->locTab[i])); | ||
42 | + } | ||
43 | } | ||
44 | |||
45 | /* | ||