projects
/
working
/
OpenSRF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bda043
)
Fix sprintf without format string.
user/paxed/fix-sprintf-format
author
Pasi Kallinen
<pasi.kallinen@pttk.fi>
Tue, 6 Aug 2013 13:56:06 +0000
(16:56 +0300)
committer
Pasi Kallinen
<paxed@alt.org>
Tue, 6 Aug 2013 13:59:19 +0000
(16:59 +0300)
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
src/gateway/osrf_http_translator.c
patch
|
blob
|
history
diff --git
a/src/gateway/osrf_http_translator.c
b/src/gateway/osrf_http_translator.c
index
f829fa0
..
cec0d4e
100644
(file)
--- a/
src/gateway/osrf_http_translator.c
+++ b/
src/gateway/osrf_http_translator.c
@@
-480,7
+480,7
@@
static int osrfHttpTranslatorProcess(osrfHttpTranslator* trans) {
buffer_chomp(buf); // chomp off the closing array bracket
char* body = osrfListGetIndex(trans->messages, i);
char newbuf[strlen(body)];
- sprintf(newbuf, body+1); // chomp off the opening array bracket
+ sprintf(newbuf,
"%s",
body+1); // chomp off the opening array bracket
OSRF_BUFFER_ADD_CHAR(buf, ',');
OSRF_BUFFER_ADD(buf, newbuf);
}