summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenhua Zhang <zhenhua.zhang@intel.com>2010-02-09 22:59:28 +0800
committerDenis Kenzior <denkenz@gmail.com>2010-02-10 16:41:31 -0600
commitc5f962cb183a2cffd25bbcd4f9e0b17a4536b263 (patch)
tree458e02eb24fe7aef6aba7b16e67fa9bcc9aa4100
parentd80bba564e83bfac83472bb68fac18ea9afaa4c0 (diff)
downloadofono-c5f962cb183a2cffd25bbcd4f9e0b17a4536b263.tar.bz2
Replace sprintf with snprintf
-rw-r--r--gatchat/gatserver.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index 16c976da..ad6afb9e 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -116,9 +116,10 @@ static void g_at_server_send_result(GAtServer *server, GAtServerResult result)
return;
if (v250.is_v1)
- sprintf(buf, "%c%c%s%c%c", t, r, result_str, t, r);
+ snprintf(buf, sizeof(buf), "%c%c%s%c%c", t, r, result_str,
+ t, r);
else
- sprintf(buf, "%u%c", (unsigned int) result, t);
+ snprintf(buf, sizeof(buf), "%u%c", (unsigned int) result, t);
g_at_util_debug_chat(FALSE, buf, strlen(buf),
server->debugf, server->debug_data);