[libxslt] Fix NULL pointer deref in xsltFormatNumberFunction
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Fix NULL pointer deref in xsltFormatNumberFunction
- Date: Sat, 27 May 2017 15:17:15 +0000 (UTC)
commit 8d1f7147c34c989e431826505854cd328244293b
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Wed May 17 13:10:05 2017 +0200
Fix NULL pointer deref in xsltFormatNumberFunction
Introduced recently with my commit
38d4a90 Make xsl:decimal-format work with namespaces
Coverity CID 1434477. Also found with libFuzzer and ASan.
libxslt/functions.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libxslt/functions.c b/libxslt/functions.c
index 5cc9da5..43d82f6 100644
--- a/libxslt/functions.c
+++ b/libxslt/functions.c
@@ -632,7 +632,9 @@ xsltFormatNumberFunction(xmlXPathParserContextPtr ctxt, int nargs)
sheet->errors++;
ncname = NULL;
}
- nsUri = ns->href;
+ else {
+ nsUri = ns->href;
+ }
}
if (ncname != NULL) {
formatValues = xsltDecimalFormatGetByQName(sheet, nsUri, ncname);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]