[ expat-Patches-565510 ] reading uninitialized variable
noreply@sourceforge.net
noreply@sourceforge.net
Thu Jun 6 13:17:04 2002
Patches item #565510, was opened at 2002-06-06 22:16
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=310127&aid=565510&group_id=10127
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: David Somers (moundsmere)
Assigned to: Nobody/Anonymous (nobody)
Summary: reading uninitialized variable
Initial Comment:
Somewhere within xmlparse.c there is the snippet:
...
for (;;) {
const char *next;
int tok = XmlPrologTok(encoding, s, end, &next);
eventEndPtr = next;
switch (tok) {
...
(Somewhere being line 3600 in expat-1.95.3.tar.gz, or
3618 according to kwaclaw).
Anyhow, my debugger warns that in some cases
eventEndPtr is being assigned to an uninitialized ptr... to
stop this happening, change:
const char *next;
to
const char *next = NULL;
Cheers,
David.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=310127&aid=565510&group_id=10127