Skip to content

Commit 3cbb831

Browse files
Andrewpinicarlescufi
authored andcommitted
Bluetooth: Mesh: Shell: Fix cfgCli appkey arg conv
Rectifies incorrect conversion of appkey string in config client appkey add command. Signed-off-by: Anders Storrø <[email protected]>
1 parent dca9c2b commit 3cbb831

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/mesh/shell/cfg_cli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ static int cmd_app_key_add(const struct shell *sh, size_t argc, char *argv[])
557557
size_t len;
558558

559559
len = hex2bin(argv[3], strlen(argv[3]), key_val, sizeof(key_val));
560-
(void)memset(key_val, 0, sizeof(key_val) - len);
560+
(void)memset(key_val + len, 0, sizeof(key_val) - len);
561561
} else {
562562
memcpy(key_val, default_key, sizeof(key_val));
563563
}

0 commit comments

Comments
 (0)