From 6f6b5ab410d79a679560297974d4991a302549a1 Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 27 Sep 2011 06:15:36 +0000 Subject: [PATCH] fix buffer overflow for LONG lines in journal handling code for update requests. fix for #316 git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@2202 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c index 9ecd39fb..27371441 100644 --- a/program/src/rrd_daemon.c +++ b/program/src/rrd_daemon.c @@ -1331,7 +1331,7 @@ static int handle_request_update (HANDLER_PROTO) /* {{{ */ /* save it for the journal later */ if (!JOURNAL_REPLAY(sock)) - strncpy(orig_buf, buffer, buffer_size); + strncpy(orig_buf, buffer, min(RRD_CMD_MAX,buffer_size)); status = buffer_get_field (&buffer, &buffer_size, &file); if (status != 0) -- 2.30.2