summaryrefslogtreecommitdiffstats
path: root/drivers/hfpmodem/voicecall.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hfpmodem/voicecall.c')
-rw-r--r--drivers/hfpmodem/voicecall.c5
1 files changed, 2 insertions, 3 deletions
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;