From: Nick Mathewson Date: Sun, 7 Nov 2004 22:18:00 +0000 (+0000) Subject: Add missing dereference; stop throwing zeroes around. X-Git-Tag: debian-version-0.0.8+0.0.9pre5-1~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66779137bf101cf244cc87136d632e667568ee8d;p=thirdparty%2Ftor.git Add missing dereference; stop throwing zeroes around. svn:r2702 --- diff --git a/src/or/buffers.c b/src/or/buffers.c index b5c0e2f7c7..14280435fb 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -670,7 +670,7 @@ int fetch_from_buf_control(buf_t *buf, uint16_t *len_out, uint16_t *type_out, if (len) { *body_out = tor_malloc(len+1); memcpy(*body_out, buf->mem+4, len); - body_out[len] = '\0'; + (*body_out)[len] = '\0'; } else { *body_out = NULL; }