mirror of git://git.sysmocom.de/ofono
hfpmodem: Incorrect string length in dtmf buf.
Strlen includes a NULL character.
This commit is contained in:
parent
ed67052411
commit
fa576435a5
|
@ -590,9 +590,8 @@ static void hfp_send_dtmf(struct ofono_voicecall *vc, const char *dtmf,
|
|||
req->data = data;
|
||||
req->affected_types = 0;
|
||||
|
||||
/* strlen("AT+VTS=") = 7 */
|
||||
buf = g_try_new(char, strlen(dtmf) + 7);
|
||||
|
||||
/* strlen("AT+VTS=) = 7 + NULL */
|
||||
buf = g_try_new(char, strlen(dtmf) + 8);
|
||||
if (buf == NULL)
|
||||
goto error;
|
||||
|
||||
|
|
Loading…
Reference in New Issue