From 9c138be9e87bac2d7bf6095d6921d768e94f9463 Mon Sep 17 00:00:00 2001 From: rusty-snake <41237666+rusty-snake@users.noreply.github.com> Date: Thu, 11 Jun 2020 22:21:39 +0200 Subject: mmapfail.sh fix https://github.com/hannob/mmapfail --- test/filters/memwrexe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/filters') diff --git a/test/filters/memwrexe.c b/test/filters/memwrexe.c index 797e7881d..e68176b42 100644 --- a/test/filters/memwrexe.c +++ b/test/filters/memwrexe.c @@ -65,7 +65,7 @@ int main(int argc, char **argv) { } void *p = mmap (0, size, PROT_READ, MAP_SHARED, fd, 0); - if (!p) { + if (p == MAP_FAILED) { fprintf(stderr, "TESTING ERROR: cannot map file for mprotect test\n"); return 1; } -- cgit v1.2.3-54-g00ecf