From 9ccc52222c287b35e41625cc282fb882544676c6 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 20 May 2024 17:48:13 +0200 Subject: tools/afcclient: Add missing argument count check for `get` command --- tools/afcclient.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools') diff --git a/tools/afcclient.c b/tools/afcclient.c index 71a1c32..617e59a 100644 --- a/tools/afcclient.c +++ b/tools/afcclient.c @@ -913,6 +913,9 @@ static void handle_get(afc_client_t afc, int argc, char **argv) dstpath[dst_len - 1] = '\0'; } free(tmp); + } else { + printf("Error: Invalid number of arguments\n"); + return; } // target is a directory, put file under this target -- cgit v1.1-32-gdbae