diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
index 9ecd39fb1d694498282627b4380b8c70b9e75b28..273714418ce0a2828e558f4291e6173c65dfca23 100644 (file)
--- a/src/rrd_daemon.c
+++ b/src/rrd_daemon.c
/* 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)