mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2025-03-01 06:56:10 +00:00
- Makefile.am: added --push regression tests
- parserInternals.c: the XML parser segfaulted in --push mode Daniel
This commit is contained in:
parent
9a89a8ab80
commit
3e5bb8e54e
@ -1,3 +1,8 @@
|
||||
Wed Jun 27 18:33:13 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* Makefile.am: added --push regression tests
|
||||
* parserInternals.c: the XML parser segfaulted in --push mode
|
||||
|
||||
Wed Jun 27 13:09:51 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* configure.in: moved the symlinks detection within a CVS
|
||||
|
20
Makefile.am
20
Makefile.am
@ -185,6 +185,26 @@ XMLtests : xmllint
|
||||
diff result.$$name result2.$$name ; \
|
||||
rm result.$$name result2.$$name ; \
|
||||
fi ; fi ; done)
|
||||
@(echo > .memdump)
|
||||
@echo "##"
|
||||
@echo "## XML push regression tests"
|
||||
@echo "##"
|
||||
@echo "## You should see one warning on entity 'title.xml' for ent2"
|
||||
@echo "##"
|
||||
@(for i in $(srcdir)/test/* ; do \
|
||||
name=`basename $$i`; \
|
||||
if [ ! -d $$i ] ; then \
|
||||
if [ ! -f $(srcdir)/result/$$name ] ; then \
|
||||
echo New test file $$name ; \
|
||||
$(top_builddir)/xmllint --push $$i > $(srcdir)/result/$$name ; \
|
||||
else \
|
||||
echo Testing $$name ; \
|
||||
$(top_builddir)/xmllint --push $$i > result.$$name ; \
|
||||
diff $(srcdir)/result/$$name result.$$name ; \
|
||||
$(top_builddir)/xmllint --push result.$$name > result2.$$name ; \
|
||||
diff result.$$name result2.$$name ; \
|
||||
rm result.$$name result2.$$name ; \
|
||||
fi ; fi ; done)
|
||||
@echo "##"
|
||||
@echo "## XML regression tests on memory"
|
||||
@echo "##"
|
||||
|
@ -1575,7 +1575,8 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
|
||||
* Specific handling of the Byte Order Mark for
|
||||
* UTF-8
|
||||
*/
|
||||
if ((ctxt->input->cur[0] == 0xEF) &&
|
||||
if ((ctxt->input != NULL) &&
|
||||
(ctxt->input->cur[0] == 0xEF) &&
|
||||
(ctxt->input->cur[1] == 0xBB) &&
|
||||
(ctxt->input->cur[2] == 0xBF)) {
|
||||
ctxt->input->cur += 3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user