From 135fa8cf5bdcf7a9cbdf75931734c86fd09489ef Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 6 Aug 2013 16:56:06 +0300 Subject: [PATCH] LP#1208860: fix sprintf without format string. Fixes error preventing installation on Debian testing and removes warning on earlier versions of Debian. Signed-off-by: Pasi Kallinen Signed-off-by: Galen Charlton --- src/gateway/osrf_http_translator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gateway/osrf_http_translator.c b/src/gateway/osrf_http_translator.c index f829fa0..cec0d4e 100644 --- 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); } -- 2.43.2