diff --git a/src/detection/swap/swap_windows.c b/src/detection/swap/swap_windows.c index a0c6999c5..558feff5c 100644 --- a/src/detection/swap/swap_windows.c +++ b/src/detection/swap/swap_windows.c @@ -14,6 +14,10 @@ const char* ffDetectSwap(FFlist* result) { return "NtQuerySystemInformation(SystemPagefileInformation, size) failed"; } + if (size == 0) { + return NULL; + } + uint32_t pageSize = instance.state.platform.sysinfo.pageSize; for (SYSTEM_PAGEFILE_INFORMATION* current = pstart;; current = (SYSTEM_PAGEFILE_INFORMATION*) ((uint8_t*) current + current->NextEntryOffset)) { FFSwapResult* swap = ffListAdd(result);