mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-06 23:52:38 -05:00
#2476 Fixed crash in DMI memory reader.
This commit is contained in:
@@ -230,6 +230,10 @@ void xmrig::DmiMemory::setId(const char *slot, const char *bank)
|
|||||||
m_slot = slot;
|
m_slot = slot;
|
||||||
m_bank = bank;
|
m_bank = bank;
|
||||||
|
|
||||||
|
if (!slot || !bank) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
std::cmatch cm;
|
std::cmatch cm;
|
||||||
if (std::regex_match(slot, cm, std::regex("^Channel([A-Z])[-_]DIMM(\\d+)$", std::regex_constants::icase))) {
|
if (std::regex_match(slot, cm, std::regex("^Channel([A-Z])[-_]DIMM(\\d+)$", std::regex_constants::icase))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user