Diff between 393e81a7473c636a6a00f49d9246e8a2e6d5674a and 2efd925db0b537c422d30283514e81816b673a03
Changed Files
| File | Additions | Deletions | Status |
| client/assistant.c | +1 | -1 | modified |
Full Patch
diff --git a/client/assistant.c b/client/assistant.c
index 5850b58..3551aaa 100644
--- a/client/assistant.c
+++ b/client/assistant.c
@@ -261,7 +261,7 @@ static void assistant_set_bcode_cfg(const char *input, void *user_data)
if (!strcasecmp(input, "a") || !strcasecmp(input, "auto")) {
memset(cfg->qos.bcast.bcode, 0, BCODE_LEN);
} else {
- if (strlen(input) > BCODE_LEN) {
+ if (strnlen(input, BCODE_LEN + 1) > BCODE_LEN) {
bt_shell_printf("Input string too long %s\n", input);
goto fail;
}