]> git.ipfire.org Git - thirdparty/suricata.git/commit
util/pages: suppress scan-build on page check
authorVictor Julien <vjulien@oisf.net>
Thu, 8 May 2025 08:18:02 +0000 (10:18 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 9 May 2025 05:50:41 +0000 (07:50 +0200)
commit1e682130980987ed858932aeb0216cd3cf8ac839
tree5e0fdf5eee7ba98b0986a0b67e6c5059fd568ef6
parent61b21dd167e27cf7584a143ed8ac3af4e9124125
util/pages: suppress scan-build on page check

Suppress the following warning:

util-pages.c:49:13: warning: Both PROT_WRITE and PROT_EXEC flags are set. This can lead to exploitable memory regions, which could be overwritten with malicious code [security.MmapWriteExec]
   49 |         if (mprotect(ptr, getpagesize(), PROT_READ|PROT_WRITE|PROT_EXEC) == -1) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

As the check is done to check if the OS allows it or not, for enabling
JIT in pcre.
src/util-pages.c