mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-25 15:41:00 +00:00
prevent segfault by only copying strlen(ptr) for Bluetooth name - thanks to akolhlsmith for detecting this
This commit is contained in:
parent
ad888e05a6
commit
94173b5450
@ -110,7 +110,7 @@ uint16_t hci_create_cmd_internal(uint8_t *hci_cmd_buffer, hci_cmd_t *cmd, va_lis
|
||||
break;
|
||||
case 'N': { // UTF-8 string, null terminated
|
||||
ptr = va_arg(argptr, uint8_t *);
|
||||
uint16_t len = strlen(ptr);
|
||||
uint16_t len = strlen((const char*) ptr);
|
||||
if (len > 248) {
|
||||
len = 248;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user