mirror of https://github.com/BOINC/boinc.git
Client: don't crash when <exclude_gpu> has bad device #
This commit is contained in:
parent
4655fce0b4
commit
ff7ea08957
|
@ -274,6 +274,9 @@ int EXCLUDE_GPU::parse(XML_PARSER& xp) {
|
|||
if (!xp.is_tag) continue;
|
||||
if (xp.match_tag("/exclude_gpu")) {
|
||||
if (!found_url) return ERR_XML_PARSE;
|
||||
if (device_num >= MAX_COPROC_INSTANCES) {
|
||||
return ERR_XML_PARSE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (xp.parse_string("url", url)) {
|
||||
|
|
Loading…
Reference in New Issue