From cc3fcb0ec65c2ac4d0687c389ebea7112ba4fd10 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 21 Apr 2021 19:20:12 +0200 Subject: [PATCH] might fix coverity CID 305865 --- client/src/proxmark3.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 99babb84b..0541e1d41 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -915,13 +915,16 @@ int main(int argc, char *argv[]) { // execute lua script if (strcmp(argv[i], "-l") == 0 || strcmp(argv[i], "--lua") == 0) { - addLuaExec = true; if (i + 1 == argc || strlen(argv[i + 1]) == 0) { PrintAndLogEx(ERR, _RED_("ERROR:") " missing lua script specification after -l\n"); show_help(false, exec_name); return 1; } script_cmd = argv[++i]; + if (script_cmd == NULL || strlen(script_cmd) == 0) { + return 1; + } + addLuaExec = true; continue; }