[Expat-discuss] Expat 1.2 bug?

erik eriksson ee@opera.com
17 Oct 2002 13:24:33 +0200


---------------------- multipart/mixed attachment
Hi,

This test program with attached xml-file crashes Expat 1.2. Is this a
known bug? Is there any patch available? Reading same file with expat
1.95.2 (installed on my Debian system) works fine.

(attachments also available as http://people.opera.com/~ee/xml/crash.c
and http://people.opera.com/~ee/xml/crash.xml)

  / erik


---------------------- multipart/mixed attachment
#include <stdio.h>
#include "expat/xmlparse/xmlparse.h"

char* filename = "crash.xml";

int main()
{
	XML_Parser xml_parser = XML_ParserCreate("utf-16");

	FILE* f = fopen(filename, "r");
	size_t bufsize = 32;
	char buf[bufsize];
	
	size_t s = fread(buf, 1, bufsize, f);
	while (s > 0)
	{
		int result = XML_Parse(xml_parser, buf, s, 0);
		s = fread(buf, 1, bufsize, f);
	}

	XML_ParserFree(xml_parser);
}

---------------------- multipart/mixed attachment
A non-text attachment was scrubbed...
Name: crash.xml
Type: text/xml
Size: 12 bytes
Desc: crashes expat
Url : http://mail.libexpat.org/pipermail-21/expat-discuss/attachments/20021017/bb20b19f/crash.xml

---------------------- multipart/mixed attachment


-- 
ee@opera.com +4613203202(work) +46705228912(cell) +4613102599(home)

---------------------- multipart/mixed attachment--