Explorar o código

Avoid an infinite loop on evil controlport input. Fixes bug 350,
unless it doesn't. (Nick, please confirm.)

Backport candidate.


svn:r8844

Roger Dingledine %!s(int64=19) %!d(string=hai) anos
pai
achega
8f7940348f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/or/buffers.c

+ 1 - 1
src/or/buffers.c

@@ -1252,7 +1252,7 @@ find_char_on_buf(buf_t *buf, char *start, size_t len, char c)
   size_t len_rest;
   char *cp;
   _split_range(buf, start, &len, &len_rest);
-  cp = memchr(buf->cur, c, len);
+  cp = memchr(start, c, len);
   if (cp || !len_rest)
     return cp;
   return memchr(buf->mem, c, len_rest);