hf felica liteauth: use NULL instead of "" for options without a long name
argtable treats the long option field as a string to scan; an empty literal makes arg_parse() read one byte past it. AddressSanitizer flags it as a global-buffer-overflow whenever the command's help is built, e.g. on every `proxmark3 --fulltext`. Every other command in the client passes NULL here. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4353c0bb8c
commit
f2c214722c
2 files changed
+3
-2
No files matched your search
@@ -8999,9 +8999,9 @@ static int CmdHFFelicaAuthenticationLite(const char *Cmd) {
|
||||
void *argtable[] = {
|
||||
arg_param_begin,
|
||||
arg_str0(NULL, "key", "<hex>", "set card key, 16 bytes"),
|
||||
arg_str0("c", "", "<hex>", "set random challenge, 16 bytes"),
|
||||
arg_str0("c", NULL, "<hex>", "set random challenge, 16 bytes"),
|
||||
arg_str0(NULL, "idm", "<hex>", "set custom IDm"),
|
||||
arg_lit0("k", "", "keep signal field ON after receive"),
|
||||
arg_lit0("k", NULL, "keep signal field ON after receive"),
|
||||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||
|
||||
Reference in new issue
Block a user