From fa576435a5e3873dd38fdca8acf0aee78a6b9bf6 Mon Sep 17 00:00:00 2001 From: Helen Clemson Date: Fri, 14 Jan 2011 12:14:24 +0100 Subject: hfpmodem: Incorrect string length in dtmf buf. Strlen includes a NULL character. --- drivers/hfpmodem/voicecall.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/hfpmodem/voicecall.c') diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c index 4c8ee370..d4d370e3 100644 --- a/drivers/hfpmodem/voicecall.c +++ b/drivers/hfpmodem/voicecall.c @@ -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; -- cgit v1.2.3