aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-06-05 14:47:53 +0200
committerAlice Frosi <afrosi@redhat.com>2023-06-05 14:47:53 +0200
commit2bd770154d4960c2c594f3380caf320c81e1cbcc (patch)
tree8f6bdbc5c6da11b3f3bced9b62d00f51dca6c8d0
parentd02e5d542527163231defd7b8d969d1265ca155a (diff)
downloadseitan-2bd770154d4960c2c594f3380caf320c81e1cbcc.tar
seitan-2bd770154d4960c2c594f3380caf320c81e1cbcc.tar.gz
seitan-2bd770154d4960c2c594f3380caf320c81e1cbcc.tar.bz2
seitan-2bd770154d4960c2c594f3380caf320c81e1cbcc.tar.lz
seitan-2bd770154d4960c2c594f3380caf320c81e1cbcc.tar.xz
seitan-2bd770154d4960c2c594f3380caf320c81e1cbcc.tar.zst
seitan-2bd770154d4960c2c594f3380caf320c81e1cbcc.zip
seitan: use jmp.offset as absolute value
-rw-r--r--operations.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/operations.c b/operations.c
index 6d32751..fc27270 100644
--- a/operations.c
+++ b/operations.c
@@ -364,15 +364,13 @@ int op_cmp(const struct seccomp_notif *req, int notifier, struct gluten *g,
res = memcmp(px, py, op->size);
- if (gluten_read(NULL, g, &jmp, op->jmp, sizeof(jmp)) == -1)
- return -1;
if ((res == 0 && (cmp == CMP_EQ || cmp == CMP_LE || cmp == CMP_GE)) ||
(res < 0 && (cmp == CMP_LT || cmp == CMP_LE)) ||
(res > 0 && (cmp == CMP_GT || cmp == CMP_GE)) ||
(res != 0 && (cmp == CMP_NE))) {
debug(" op_cmp: successful comparison");
- debug(" op_cmp: jump to %d", jmp);
- return jmp;
+ debug(" op_cmp: jump to %d", op->jmp.offset);
+ return op->jmp.offset;
}
return 0;