From b29288b8b000730bbd416b0e1f4f4c694e346e20 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Wed, 10 May 2023 14:20:01 +0200 Subject: ops: check for SECCOMP_DATA Add check if offset type is SECCOMP_DATA and the seccomp request is set. --- common/gluten.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') diff --git a/common/gluten.h b/common/gluten.h index 078c6fa..8d74819 100644 --- a/common/gluten.h +++ b/common/gluten.h @@ -244,6 +244,9 @@ static inline const void *gluten_ptr(const struct seccomp_data *s, if (!is_offset_valid(x)) return NULL; + if(x.type == OFFSET_SECCOMP_DATA && s == NULL) + return NULL; + switch (x.type) { case OFFSET_DATA: return g->data + x.offset; -- cgit v1.2.3