Skip to content

Commit 7b51112

Browse files
committed
Minor changes
1 parent 3d11110 commit 7b51112

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

main.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,17 +451,29 @@ TEST_SUITE("Detours::Scan") {
451451
unsigned char pLeakTestEmptyArray[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0xED, 0xBE, 0xEF };
452452

453453
CHECK(Detours::Scan::FindSignatureNative(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 4, "\xDE\xED\x2A\xEF") == nullptr);
454+
CHECK(Detours::Scan::FindSignatureNative(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 3, "\xDE\xED\x2A\xEF") == nullptr);
455+
CHECK(Detours::Scan::FindSignatureNative(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 2, "\xDE\xED\x2A\xEF") == nullptr);
456+
CHECK(Detours::Scan::FindSignatureNative(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 1, "\xDE\xED\x2A\xEF") == nullptr);
454457

455458
if (bHaveSSE2) {
456459
CHECK(Detours::Scan::FindSignatureSSE2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 4, "\xDE\xED\x2A\xEF") == nullptr);
460+
CHECK(Detours::Scan::FindSignatureSSE2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 3, "\xDE\xED\x2A\xEF") == nullptr);
461+
CHECK(Detours::Scan::FindSignatureSSE2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 2, "\xDE\xED\x2A\xEF") == nullptr);
462+
CHECK(Detours::Scan::FindSignatureSSE2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 1, "\xDE\xED\x2A\xEF") == nullptr);
457463
}
458464

459465
if (bHaveAVX2) {
460466
CHECK(Detours::Scan::FindSignatureAVX2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 4, "\xDE\xED\x2A\xEF") == nullptr);
467+
CHECK(Detours::Scan::FindSignatureAVX2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 3, "\xDE\xED\x2A\xEF") == nullptr);
468+
CHECK(Detours::Scan::FindSignatureAVX2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 2, "\xDE\xED\x2A\xEF") == nullptr);
469+
CHECK(Detours::Scan::FindSignatureAVX2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 1, "\xDE\xED\x2A\xEF") == nullptr);
461470
}
462471

463472
if (bHaveAVX512) {
464473
CHECK(Detours::Scan::FindSignatureAVX512(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 4, "\xDE\xED\x2A\xEF") == nullptr);
474+
CHECK(Detours::Scan::FindSignatureAVX512(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 3, "\xDE\xED\x2A\xEF") == nullptr);
475+
CHECK(Detours::Scan::FindSignatureAVX512(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 2, "\xDE\xED\x2A\xEF") == nullptr);
476+
CHECK(Detours::Scan::FindSignatureAVX512(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 1, "\xDE\xED\x2A\xEF") == nullptr);
465477
}
466478

467479
unsigned char pAlignEmptyArray[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
@@ -770,17 +782,21 @@ TEST_SUITE("Detours::Scan") {
770782
unsigned char pLeakTestEmptyArray[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0xED, 0xBE, 0xEF };
771783

772784
CHECK(Detours::Scan::FindDataNative(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 4, reinterpret_cast<unsigned char const*>("\xDE\xED"), 2) == nullptr);
785+
CHECK(Detours::Scan::FindDataNative(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 3, reinterpret_cast<unsigned char const*>("\xDE\xED"), 2) == nullptr);
773786

774787
if (bHaveSSE2) {
775788
CHECK(Detours::Scan::FindDataSSE2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 4, reinterpret_cast<unsigned char const*>("\xDE\xED"), 2) == nullptr);
789+
CHECK(Detours::Scan::FindDataSSE2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 3, reinterpret_cast<unsigned char const*>("\xDE\xED"), 2) == nullptr);
776790
}
777791

778792
if (bHaveAVX2) {
779793
CHECK(Detours::Scan::FindDataAVX2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 4, reinterpret_cast<unsigned char const*>("\xDE\xED"), 2) == nullptr);
794+
CHECK(Detours::Scan::FindDataAVX2(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 3, reinterpret_cast<unsigned char const*>("\xDE\xED"), 2) == nullptr);
780795
}
781796

782797
if (bHaveAVX512) {
783798
CHECK(Detours::Scan::FindDataAVX512(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 4, reinterpret_cast<unsigned char const*>("\xDE\xED"), 2) == nullptr);
799+
CHECK(Detours::Scan::FindDataAVX512(pLeakTestEmptyArray, sizeof(pLeakTestEmptyArray) - 3, reinterpret_cast<unsigned char const*>("\xDE\xED"), 2) == nullptr);
784800
}
785801

786802
unsigned char pAlignEmptyArray[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

0 commit comments

Comments
 (0)