aboutgitcodelistschat:MatrixIRC
path: root/common
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-09-08 08:44:30 -0400
committerAlice Frosi <afrosi@redhat.com>2023-09-08 08:44:30 -0400
commit7837722a09c08957af93055062cecfd9c3ea8b14 (patch)
tree9a09b2c6fe765e31d1414a70b8d01b891f688d73 /common
parent24659c84ab27ad19d95f0c64dcc9568f2bbb4b66 (diff)
downloadseitan-7837722a09c08957af93055062cecfd9c3ea8b14.tar
seitan-7837722a09c08957af93055062cecfd9c3ea8b14.tar.gz
seitan-7837722a09c08957af93055062cecfd9c3ea8b14.tar.bz2
seitan-7837722a09c08957af93055062cecfd9c3ea8b14.tar.lz
seitan-7837722a09c08957af93055062cecfd9c3ea8b14.tar.xz
seitan-7837722a09c08957af93055062cecfd9c3ea8b14.tar.zst
seitan-7837722a09c08957af93055062cecfd9c3ea8b14.zip
gluten: throw an error if the offset is seccomp but the request is empty
Diffstat (limited to 'common')
-rw-r--r--common/gluten.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/gluten.h b/common/gluten.h
index 1f06221..e80916a 100644
--- a/common/gluten.h
+++ b/common/gluten.h
@@ -357,8 +357,10 @@ static inline const void *gluten_ptr(const struct seccomp_data *s,
return NULL;
}
- if (x.type == OFFSET_SECCOMP_DATA && s == NULL)
+ if (x.type == OFFSET_SECCOMP_DATA && s == NULL) {
+ err(" seccomp data is empty");
return NULL;
+ }
switch (x.type) {
case OFFSET_DATA: