Hi Helen, > Strlen includes a NULL character. This change affects both stemodem and > hfpmodem. > --- > drivers/hfpmodem/voicecall.c | 4 ++-- > drivers/stemodem/voicecall.c | 5 ++--- > 2 files changed, 4 insertions(+), 5 deletions(-)
please break this down into two patches. We always use separate patches per driver directory. In addition it also then makes your subject line correct. > diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c > index 4c8ee37..1aefc53 100644 > --- a/drivers/hfpmodem/voicecall.c > +++ b/drivers/hfpmodem/voicecall.c > @@ -590,8 +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); > While you are modifying this anyway, please also remove this extra empty line. We try not to have that one if we check the result right away. > if (buf == NULL) > goto error; Regards Marcel _______________________________________________ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono