removed an uninitialized data error popped by valgrind on PE references

* parser.c: removed an uninitialized data error popped by valgrind
  on PE references
Daniel
This commit is contained in:
Daniel Veillard 2002-06-13 15:32:10 +00:00
parent d7ca7f924f
commit e059b891ef
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,8 @@
Thu Jun 13 17:30:25 CEST 2002 Daniel Veillard <daniel@veillard.com>
* parser.c: removed an uninitialized data error popped by valgrind
on PE references
Wed Jun 12 21:38:46 MDT 2002 John Fleck <jfleck@inkstain.net>
* doc/xml.html

View File

@ -899,13 +899,15 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
* plug some encoding conversion routines.
*/
GROW
start[0] = RAW;
start[1] = NXT(1);
start[2] = NXT(2);
start[3] = NXT(3);
enc = xmlDetectCharEncoding(start, 4);
if (enc != XML_CHAR_ENCODING_NONE) {
xmlSwitchEncoding(ctxt, enc);
if (entity->length >= 4) {
start[0] = RAW;
start[1] = NXT(1);
start[2] = NXT(2);
start[3] = NXT(3);
enc = xmlDetectCharEncoding(start, 4);
if (enc != XML_CHAR_ENCODING_NONE) {
xmlSwitchEncoding(ctxt, enc);
}
}
if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&