Przeglądaj źródła

Add missing dereference; stop throwing zeroes around.

svn:r2702
Nick Mathewson 21 lat temu
rodzic
commit
66779137bf
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/or/buffers.c

+ 1 - 1
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;
   }