[or-cvs] r8844: Avoid an infinite loop on evil controlport input. Fixes bug (tor/trunk/src/or)
arma at seul.org
arma at seul.org
Sat Oct 28 08:17:05 UTC 2006
Author: arma
Date: 2006-10-28 04:17:02 -0400 (Sat, 28 Oct 2006)
New Revision: 8844
Modified:
tor/trunk/src/or/buffers.c
Log:
Avoid an infinite loop on evil controlport input. Fixes bug 350,
unless it doesn't. (Nick, please confirm.)
Backport candidate.
Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c 2006-10-28 06:26:00 UTC (rev 8843)
+++ tor/trunk/src/or/buffers.c 2006-10-28 08:17:02 UTC (rev 8844)
@@ -1252,7 +1252,7 @@
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);
More information about the tor-commits
mailing list