[libxml2] Fix SEGV in xmlSAXParseFileWithData
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix SEGV in xmlSAXParseFileWithData
- Date: Mon, 21 Sep 2020 11:19:03 +0000 (UTC)
commit 7929f05710134b9b243952019b6c14066cd3ac9e
Author: yanjinjq <jiqin ji huawei com>
Date: Sun Aug 30 10:34:01 2020 +0000
Fix SEGV in xmlSAXParseFileWithData
Fixes #181.
parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/parser.c b/parser.c
index be14c3228..f779eb6a1 100644
--- a/parser.c
+++ b/parser.c
@@ -14077,7 +14077,7 @@ xmlSAXParseFileWithData(xmlSAXHandlerPtr sax, const char *filename,
if ((ctxt->wellFormed) || recovery) {
ret = ctxt->myDoc;
- if (ret != NULL) {
+ if ((ret != NULL) && (ctxt->input->buf != NULL)) {
if (ctxt->input->buf->compressed > 0)
ret->compression = 9;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]