summaryrefslogtreecommitdiffstats
path: root/drivers/hfpmodem/voicecall.c
diff options
context:
space:
mode:
authorHelen Clemson <helen.clemson@stericsson.com>2011-01-14 12:14:24 +0100
committerMarcel Holtmann <marcel@holtmann.org>2011-01-14 14:26:37 +0100
commitfa576435a5e3873dd38fdca8acf0aee78a6b9bf6 (patch)
treeb3cb01705cd714b20b89a890e3e53f632cda7f33 /drivers/hfpmodem/voicecall.c
parented670524110d169a17ae5b45cd94c5ed9dc0edc8 (diff)
downloadofono-fa576435a5e3873dd38fdca8acf0aee78a6b9bf6.tar.bz2
hfpmodem: Incorrect string length in dtmf buf.
Strlen includes a NULL character.
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;