hfpmodem: Incorrect string length in dtmf buf.

Strlen includes a NULL character.
This commit is contained in:
Helen Clemson 2011-01-14 12:14:24 +01:00 committed by Marcel Holtmann
parent ed67052411
commit fa576435a5
1 changed files with 2 additions and 3 deletions

View File

@ -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;