diff options
author | Mike Strosaker <strosake@linux.vnet.ibm.com> | 2015-05-06 15:38:06 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2015-05-06 15:38:06 -0400 |
commit | b09fe0c60626268d501690c5faa76a4947aca086 (patch) | |
tree | f200d420487223300b72d7851be80f39308e42ac | |
parent | e6ef58590962c6f133e78f4218227e82b7060b03 (diff) | |
download | libseccomp-b09fe0c60626268d501690c5faa76a4947aca086.tar.gz |
python: ensure attributes are treated as 32 bits
Retrieving attributes using the Python bindings fails on some platforms.
The attributes are encoded in a 32-bit mask. Python variables are
usually larger (64 bits); Cython is not capable of recognizing that it
should only use a 32-bit number on every platform. This patch ensures
that the variable used to store the value of the attribute is only 32 bits.
Signed-off-by: Michael Strosaker <strosake@linux.vnet.ibm.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
(imported from commit 4367b1b4f94ca1e0c0606ff85622f2ecb1a9c278)
-rw-r--r-- | src/python/seccomp.pyx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx index d2f7c90..686f7d2 100644 --- a/src/python/seccomp.pyx +++ b/src/python/seccomp.pyx @@ -409,7 +409,7 @@ cdef class SyscallFilter: Lookup the given attribute in the filter and return the attribute's value to the caller. """ - value = 0 + cdef uint32_t value = 0 rc = libseccomp.seccomp_attr_get(self._ctx, attr, <uint32_t *>&value) if rc == -errno.EINVAL: |