diff --git a/checkin_notes b/checkin_notes index 32fdf0b085..47460a86fe 100644 --- a/checkin_notes +++ b/checkin_notes @@ -10338,3 +10338,9 @@ David 22 Dec 2008 coproc.cpp,h sched/ sched_plan.cpp + +David 22 Dec 2008 + - XML_PARSER: in parse_int(), set errno to zero before calling strtol(). + + lib/ + parse.cpp diff --git a/lib/parse.cpp b/lib/parse.cpp index 7cb558699b..721109b56d 100644 --- a/lib/parse.cpp +++ b/lib/parse.cpp @@ -642,6 +642,7 @@ bool XML_PARSER::parse_int(char* parsed_tag, const char* start_tag, int& i) { return false; } } + errno = 0; int val = strtol(buf, &end, 0); if (errno == ERANGE) return false; if (end != buf+strlen(buf)) return false;