Code

use snprintf, strdup, ... where possible to make for safer operation -- Martin Pelikan
[rrdtool.git] / src / rrd_rpncalc.c
index 0677b3090634293675342b29c2db0ccae4b9026d..ab01c8ad12aed2687e1b2325fe6a0f504709e488 100644 (file)
@@ -117,7 +117,7 @@ void rpn_compact2str(
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
             _itoa(rpnc[i].val, buffer, 10);
 #else
-            sprintf(buffer, "%d", rpnc[i].val);
+            snprintf(buffer, sizeof buffer, "%d", rpnc[i].val);
 #endif
             add_op(OP_NUMBER, buffer)
         }