瀏覽代碼

note an assert trigger, if you use an old broken netscape socks4

svn:r1022
Roger Dingledine 22 年之前
父節點
當前提交
b42b16357f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/or/buffers.c

+ 3 - 0
src/or/buffers.c

@@ -532,6 +532,9 @@ int fetch_from_buf_socks(buf_t *buf, socks_request_t *req) {
       }
       log_fn(LOG_DEBUG,"Everything is here. Success.");
       strcpy(req->address, socks4_prot == socks4 ? tmpbuf : startaddr);
+      /* XXX on very old netscapes (socks4) the next line triggers an
+       * assert, because next-buf->mem+1 is greater than buf->datalen.
+       */
       buf_remove_from_front(buf, next-buf->mem+1); /* next points to the final \0 on inbuf */
       return 1;