Commit 32acf0c3 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fix potential crash if ctxt->sax->ignorableWhitespace is NULL as reported

* parser.c: fix potential crash if ctxt->sax->ignorableWhitespace
  is NULL as reported by bug #172255
Daniel
parent 63d68a37
Thu Mar 31 16:11:10 CEST 2005 Daniel Veillard <daniel@veillard.com>
* parser.c: fix potential crash if ctxt->sax->ignorableWhitespace
is NULL as reported by bug #172255
Thu Mar 31 15:36:52 CEST 2005 Daniel Veillard <daniel@veillard.com>
 
* relaxng.c: fixed a problem in Relax-NG validation #159968
......
......@@ -3220,8 +3220,9 @@ get_more_space:
(ctxt->sax->ignorableWhitespace !=
ctxt->sax->characters)) {
if (areBlanks(ctxt, tmp, nbchar, 1)) {
ctxt->sax->ignorableWhitespace(ctxt->userData,
tmp, nbchar);
if (ctxt->sax->ignorableWhitespace != NULL)
ctxt->sax->ignorableWhitespace(ctxt->userData,
tmp, nbchar);
} else if (ctxt->sax->characters != NULL)
ctxt->sax->characters(ctxt->userData,
tmp, nbchar);
......@@ -3274,8 +3275,9 @@ get_more:
ctxt->input->cur = in;
if (areBlanks(ctxt, tmp, nbchar, 0)) {
ctxt->sax->ignorableWhitespace(ctxt->userData,
tmp, nbchar);
if (ctxt->sax->ignorableWhitespace != NULL)
ctxt->sax->ignorableWhitespace(ctxt->userData,
tmp, nbchar);
} else if (ctxt->sax->characters != NULL)
ctxt->sax->characters(ctxt->userData,
tmp, nbchar);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment