Finally fix #1874.

This commit is contained in:
Victor M. Alvarez
2023-02-22 14:18:20 +01:00
parent bdd3980393
commit 17ae552539
-7
View File
@@ -874,14 +874,7 @@ const char *hash2(
tmp.checksum[k] = swap_byte(impl->lsh_bin.checksum[k]);
}
tmp.lvalue = swap_byte(impl->lsh_bin.lvalue);
#if defined(WORDS_BIGENDIAN)
// In big endian architectures swapping the bytes is not necessary, as they
// are already swapped. See: https://github.com/VirusTotal/yara/issues/1874
tmp.Q.qb = impl->lsh_bin.Q.qb;
#else
tmp.Q.qb = swap_byte(impl->lsh_bin.Q.qb);
#endif
for (int i = 0; i < CODE_SIZE; i++)
{