diff options
author | Helen Clemson <helen.clemson@stericsson.com> | 2011-01-14 12:13:19 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-01-14 14:26:21 +0100 |
commit | ed670524110d169a17ae5b45cd94c5ed9dc0edc8 (patch) | |
tree | 5e2ef3c579c868a9e86fd29077f5d8e6d1074257 /drivers/stemodem | |
parent | 524271602465e1ccc4e99e1b48f9b789493a2de6 (diff) | |
download | ofono-ed670524110d169a17ae5b45cd94c5ed9dc0edc8.tar.bz2 |
stemodem: Incorrect string length in dtmf buf.
Strlen includes a NULL character.
Diffstat (limited to 'drivers/stemodem')
-rw-r--r-- | drivers/stemodem/voicecall.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index 6f948f7b..423f63ee 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -375,16 +375,14 @@ static void ste_send_dtmf(struct ofono_voicecall *vc, const char *dtmf, { struct voicecall_data *vd = ofono_voicecall_get_data(vc); struct cb_data *cbd = cb_data_new(cb, data); - int len = strlen(dtmf); int s; char *buf; if (cbd == NULL) goto error; - /* strlen("AT+VTS=) = 7 */ - buf = g_try_new(char, len + 7); - + /* strlen("AT+VTS=) = 7 + NULL */ + buf = g_try_new(char, strlen(dtmf) + 8); if (buf == NULL) goto error; |