From: Helen Clemson <[email protected]>
Strlen includes a NULL character.
---
drivers/hfpmodem/voicecall.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index 4c8ee37..d4d370e 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;
--
1.7.1
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono