From 2163d781267d666ded70678ce62b9916665d8357 Mon Sep 17 00:00:00 2001 From: Jakub Kramarz Date: Fri, 9 May 2025 00:05:43 +0200 Subject: [PATCH] cmdhfseos: fix invalid memory access in select_DF_verify The real default key index in CmdHfSeosGDF passed to select_DF_verify was different than documented, resulting in out of bound read. --- client/src/cmdhfseos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfseos.c b/client/src/cmdhfseos.c index a4dfbc2ac..69b789d42 100644 --- a/client/src/cmdhfseos.c +++ b/client/src/cmdhfseos.c @@ -1351,7 +1351,7 @@ static int CmdHfSeosGDF(const char *Cmd) { }; CLIExecWithReturn(ctx, Cmd, argtable, true); - int key_index = arg_get_int_def(ctx, 1, -1); + int key_index = arg_get_int_def(ctx, 1, 0); CLIParserFree(ctx); return seos_global_df(key_index);