]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add missing dereference; stop throwing zeroes around.
authorNick Mathewson <nickm@torproject.org>
Sun, 7 Nov 2004 22:18:00 +0000 (22:18 +0000)
committerNick Mathewson <nickm@torproject.org>
Sun, 7 Nov 2004 22:18:00 +0000 (22:18 +0000)
svn:r2702

src/or/buffers.c

index b5c0e2f7c7cd57ec0b14737e036fddd083fae314..14280435fbc705f20144f115860524dac4bfffc1 100644 (file)
@@ -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;
   }