mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:35:42 +01:00
fix buffer length calculation
The send_hex buffer length has to include the separating space, too.
This commit is contained in:
parent
d7d4a53d59
commit
c44463f841
1 changed files with 1 additions and 1 deletions
|
@ -381,7 +381,7 @@ void add_send_hex_data(const char *str)
|
|||
int length;
|
||||
char *s;
|
||||
|
||||
length = (send_hex ? strlen(send_hex) : 0) + strlen(str) + 1;
|
||||
length = (send_hex ? strlen(send_hex) + 1 : 0) + strlen(str) + 1;
|
||||
s = my_malloc(length);
|
||||
if (send_hex) {
|
||||
strcpy(s, send_hex);
|
||||
|
|
Loading…
Reference in a new issue