summaryrefslogtreecommitdiffstats
path: root/drivers/calypsomodem
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-02-05 12:01:27 -0600
committerDenis Kenzior <denkenz@gmail.com>2010-02-05 12:01:27 -0600
commit098bc04347fcc6e73db1f14f339265d9b1ccb065 (patch)
tree3b3f6de4abd2bc9ca9874aa96ec2daf7886c8e1c /drivers/calypsomodem
parentced9692361cb9805b785d0b691936b3131ad29bf (diff)
downloadofono-098bc04347fcc6e73db1f14f339265d9b1ccb065.tar.bz2
Fix: Use snprintf instead of sprintf in calypso
Diffstat (limited to 'drivers/calypsomodem')
-rw-r--r--drivers/calypsomodem/voicecall.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/calypsomodem/voicecall.c b/drivers/calypsomodem/voicecall.c
index 4ff272f4..cf36db8f 100644
--- a/drivers/calypsomodem/voicecall.c
+++ b/drivers/calypsomodem/voicecall.c
@@ -87,9 +87,9 @@ static void calypso_dial(struct ofono_voicecall *vc,
char buf[256];
if (ph->type == 145)
- sprintf(buf, "ATD+%s", ph->number);
+ snprintf(buf, sizeof(buf), "ATD+%s", ph->number);
else
- sprintf(buf, "ATD%s", ph->number);
+ snprintf(buf, sizeof(buf), "ATD%s", ph->number);
switch (clir) {
case OFONO_CLIR_OPTION_INVOCATION:
@@ -159,7 +159,7 @@ static void calypso_release_specific(struct ofono_voicecall *vc, int id,
/* On calypso, 1X only releases active calls, while 7X releases
* active or held calls
*/
- sprintf(buf, "AT%%CHLD=7%d", id);
+ snprintf(buf, sizeof(buf), "AT%%CHLD=7%d", id);
calypso_template(vc, buf, cb, data);
}
@@ -168,7 +168,7 @@ static void calypso_private_chat(struct ofono_voicecall *vc, int id,
{
char buf[32];
- sprintf(buf, "AT+CHLD=2%d", id);
+ snprintf(buf, sizeof(buf), "AT+CHLD=2%d", id);
calypso_template(vc, buf, cb, data);
}
@@ -190,7 +190,7 @@ static void calypso_deflect(struct ofono_voicecall *vc,
{
char buf[128];
- sprintf(buf, "AT+CTFR=%s,%d", ph->number, ph->type);
+ snprintf(buf, sizeof(buf), "AT+CTFR=%s,%d", ph->number, ph->type);
calypso_template(vc, buf, cb, data);
}