Skip to content

Commit 382bcea

Browse files
authored
Merge pull request #4907 from BOINC/dpa_exclude_gpu
Client: don't crash when <exclude_gpu> has bad device #
2 parents d84781c + ff7ea08 commit 382bcea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/cc_config.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ int EXCLUDE_GPU::parse(XML_PARSER& xp) {
274274
if (!xp.is_tag) continue;
275275
if (xp.match_tag("/exclude_gpu")) {
276276
if (!found_url) return ERR_XML_PARSE;
277+
if (device_num >= MAX_COPROC_INSTANCES) {
278+
return ERR_XML_PARSE;
279+
}
277280
return 0;
278281
}
279282
if (xp.parse_string("url", url)) {

0 commit comments

Comments
 (0)