From: Nick Mathewson Date: Sat, 13 Mar 2010 01:38:25 +0000 (-0500) Subject: Fix a write of uninitialized RAM in regression tests X-Git-Tag: release-2.0.5-beta~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68dc742bf1adc6fb7033788a41520625c516bf48;p=libevent Fix a write of uninitialized RAM in regression tests Not actually harmful, but not something we should be doing. Found by valgrind. --- 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__);