[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master aaf6b6b: Ensure that argument to 'verify' is a constant expressio
From: |
Philipp Stephani |
Subject: |
master aaf6b6b: Ensure that argument to 'verify' is a constant expression. |
Date: |
Thu, 22 Apr 2021 10:16:46 -0400 (EDT) |
branch: master
commit aaf6b6bf80805d18180e1c16350e9473716f5915
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>
Ensure that argument to 'verify' is a constant expression.
Casting NULL is not a constant expression (Bug#47951).
* lib-src/seccomp-filter.c (main): Turn check for null pointer
representation into a runtime assertion.
---
lib-src/seccomp-filter.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c
index 31d0809..dc568e0 100644
--- a/lib-src/seccomp-filter.c
+++ b/lib-src/seccomp-filter.c
@@ -35,6 +35,7 @@ variants of those files that can be used to sandbox Emacs
before
#include "config.h"
+#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
@@ -169,7 +170,7 @@ main (int argc, char **argv)
verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN
&& LONG_MAX == INT64_MAX);
verify (sizeof (void *) == 8);
- verify ((uintptr_t) NULL == 0);
+ assert ((uintptr_t) NULL == 0);
/* Allow a clean exit. */
RULE (SCMP_ACT_ALLOW, SCMP_SYS (exit));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master aaf6b6b: Ensure that argument to 'verify' is a constant expression.,
Philipp Stephani <=