From 68dc742bf1adc6fb7033788a41520625c516bf48 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 12 Mar 2010 20:38:25 -0500 Subject: [PATCH] Fix a write of uninitialized RAM in regression tests Not actually harmful, but not something we should be doing. Found by valgrind. --- test/regress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/regress.c b/test/regress.c index f30bdf88..96aebc60 100644 --- a/test/regress.c +++ b/test/regress.c @@ -282,6 +282,8 @@ combined_write_cb(evutil_socket_t fd, short event, void *arg) if (len > both->nread) len = both->nread; + memset(buf, 'q', len); + len = write(fd, buf, len); if (len == -1) fprintf(stderr, "%s: write\n", __func__); -- 2.40.0