aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/lua-lpeg
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-17 23:26:05 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-17 23:26:05 +0100
commitd05d841321b6889b035327caa71f10084130ca4a (patch)
tree64fcfe0bf391ded7d421cd2cdff966d956277115 /contrib/lua-lpeg
parent8262bfa73f9067ebb7c6d0e2ea7851b5b2496064 (diff)
downloadrspamd-d05d841321b6889b035327caa71f10084130ca4a.tar.gz
rspamd-d05d841321b6889b035327caa71f10084130ca4a.zip
[Fix] Mmap return value must be checked versus MAP_FAILED
Issue: #3459
Diffstat (limited to 'contrib/lua-lpeg')
-rw-r--r--contrib/lua-lpeg/lpvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/lua-lpeg/lpvm.c b/contrib/lua-lpeg/lpvm.c
index 3e67fcaf0..7ee8b695a 100644
--- a/contrib/lua-lpeg/lpvm.c
+++ b/contrib/lua-lpeg/lpvm.c
@@ -73,7 +73,7 @@ lpeg_allocate_mem_low (size_t sz)
cp = mmap (base_addr, sz + sizeof (sz), PROT_WRITE | PROT_READ,
flags, -1, 0);
- assert (cp != NULL);
+ assert (cp != MAP_FAILED);
memcpy (cp, &sz, sizeof (sz));
for (unsigned i = 0; i < MAX_PIECES; i ++) {