mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-10 21:04:37 +00:00
#2476 Fixed crash in DMI memory reader.
This commit is contained in:
parent
755fe28bc3
commit
93805cd167
1 changed files with 4 additions and 0 deletions
|
@ -230,6 +230,10 @@ void xmrig::DmiMemory::setId(const char *slot, const char *bank)
|
|||
m_slot = slot;
|
||||
m_bank = bank;
|
||||
|
||||
if (!slot || !bank) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
std::cmatch cm;
|
||||
if (std::regex_match(slot, cm, std::regex("^Channel([A-Z])[-_]DIMM(\\d+)$", std::regex_constants::icase))) {
|
||||
|
|
Loading…
Reference in a new issue