mirror of https://github.com/BOINC/boinc.git
- XML_PARSER: in parse_int(), set errno to zero before calling strtol().
svn path=/trunk/boinc/; revision=16739
This commit is contained in:
parent
7f26875f08
commit
cc622c2f4f
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue