diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-11-05 23:34:39 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-11-05 23:34:39 +0000 |
commit | 6fcda5299fe7c0a40d3bff06ac4dcfe13d02d476 (patch) | |
tree | eb42e117ce2b35dab8ae718df80c77946eae6040 /src/or/buffers.c | |
parent | 9a20a64b62b149b102a487b6dc099fa310553f3c (diff) | |
download | tor-6fcda5299fe7c0a40d3bff06ac4dcfe13d02d476.tar.gz tor-6fcda5299fe7c0a40d3bff06ac4dcfe13d02d476.zip |
r14727@31-33-67: nickm | 2007-11-05 18:34:35 -0500
Make VERSIONS variable-length.
svn:r12391
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index e4ee8dc5c7..8c988f84c8 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1015,9 +1015,8 @@ fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out) length = ntohs(get_uint16(hdr+3)); if (buf->datalen < (size_t)(VAR_CELL_HEADER_SIZE+length)) return 1; - result = tor_malloc(sizeof(var_cell_t)+length-1); + result = var_cell_new(length); result->command = command; - result->payload_len = length; result->circ_id = ntohs(*(uint16_t*)hdr); buf_remove_from_front(buf, VAR_CELL_HEADER_SIZE); |