Reported by Pascal Cuoq
Valgrind's view:
==4416== Conditional jump or move depends on uninitialised value(s)
==4416== at 0x41F187: little2_updatePosition (xmltok_impl.c:1748)
==4416== by 0x405F85: XML_GetCurrentColumnNumber (xmlparse.c:1931)
==4416== by 0x402F7B: reportError (xmlfile.c:67)
==4416== by 0x403041: processFile (xmlfile.c:84)
==4416== by 0x403752: filemap (unixfilemap.c:61)
==4416== by 0x403523: XML_ProcessFile (xmlfile.c:239)
==4416== by 0x402EBC: main (xmlwf.c:847)
const char *end,
POSITION *pos)
{
- while (ptr < end) {
+ while (end - ptr >= MINBPC(enc)) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \