]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a bug that roger found in the wide_circ_id code
authorNick Mathewson <nickm@torproject.org>
Fri, 15 Feb 2013 23:20:46 +0000 (18:20 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 15 Feb 2013 23:20:46 +0000 (18:20 -0500)
src/or/buffers.c

index 33ea978daabde56bef87cbcb5782974f14311461..b54584fb4ab3ff5872fa97225782c73ad2e26e81 100644 (file)
@@ -1056,7 +1056,7 @@ fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out, int linkproto)
   *out = NULL;
   if (buf->datalen < header_len)
     return 0;
-  peek_from_buf(hdr, sizeof(hdr), buf);
+  peek_from_buf(hdr, header_len, buf);
 
   command = get_uint8(hdr + circ_id_len);
   if (!(cell_command_is_var_length(command, linkproto)))