Fixed unaligned memory accesses

This commit is contained in:
SChernykh 2022-01-26 15:26:23 +01:00
parent 41a3f97060
commit 644f4cc017
9 changed files with 74 additions and 14 deletions

View file

@ -30,6 +30,7 @@
#include "base/net/stratum/Job.h"
#include "base/tools/Alignment.h"
#include "base/tools/Buffer.h"
#include "base/tools/Cvt.h"
#include "base/tools/cryptonote/BlockTemplate.h"
@ -73,7 +74,7 @@ bool xmrig::Job::setBlob(const char *blob)
return false;
}
if (*nonce() != 0 && !m_nicehash) {
if (readUnaligned(nonce()) != 0 && !m_nicehash) {
m_nicehash = true;
}