X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_daemon.c;h=0ea5bf767f0e45fd88a28a1bdb19020e97dccb48;hp=0610d388b997f42b11b948850f2cf95e4b4c1c57;hb=4e8787fdbff3ddd4044e19cf37b9e3a54b5ef0cb;hpb=2f28002d6613be5c03edb76958b6aa6b300c8a80 diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index 0610d38..0ea5bf7 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -599,7 +599,7 @@ static int send_response (listen_socket_t *sock, response_code rc, else lines = -1; - rclen = sprintf(buffer, "%d ", lines); + rclen = snprintf(buffer, sizeof buffer, "%d ", lines); va_start(argp, fmt); #ifdef HAVE_VSNPRINTF len = vsnprintf(buffer+rclen, sizeof(buffer)-rclen, fmt, argp);