[rrd-developers] [PATCH] [BUG] error reporting caused crash in journal replay

kevin brintnall kbrint at rufus.net
Wed Oct 15 19:13:45 CEST 2008


Attempt to access sock->wbuf while in journal replay causes SIGSEGV.
This bug was introduced with the timestamp checking code in r1596.
---
 src/rrd_daemon.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
index 9fbbc11..40785b0 100644
--- a/src/rrd_daemon.c
+++ b/src/rrd_daemon.c
@@ -1525,6 +1525,9 @@ static int handle_request_update (listen_socket_t *sock, /* {{{ */
 
   if (values_num < 1)
   {
+    /* journal replay mode */
+    if (sock == NULL) return RESP_ERR;
+
     /* if we had only one update attempt, then return the full
        error message... try to get the most information out
        of the limited error space allowed by the protocol
-- 
1.6.0.2



More information about the rrd-developers mailing list