From 39b6b2033a8f76400f0d9a1fc124d3e1319e2f01 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Tue, 12 Mar 2024 15:02:41 +0100 Subject: [PATCH] seccomp_run: fix argc check Signed-off-by: Giuseppe Scrivano --- src/seccomp_run.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/seccomp_run.c b/src/seccomp_run.c index 1c6005f..0e90dfc 100644 --- a/src/seccomp_run.c +++ b/src/seccomp_run.c @@ -1,7 +1,7 @@ /* * easyseccomp * - * Copyright (C) 2022 Giuseppe Scrivano + * Copyright (C) 2022, 2024 Giuseppe Scrivano * easyseccomp is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -48,7 +48,7 @@ main (int argc, char *argv[]) int fd; int r; - if (argc < 0) + if (argc < 3) error (EXIT_FAILURE, 0, "usage: %s seccomp.bpf COMMAND ...", argv[0]); fd = open (argv[1], O_RDONLY|O_CLOEXEC);