diff options
author | Roger Dingledine <arma@torproject.org> | 2006-10-28 08:17:02 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-10-28 08:17:02 +0000 |
commit | 8f7940348fcf76596229d67b52e15bf3d9f24852 (patch) | |
tree | 3a699846001834f7e89f3ec7a9c32ac8a6d77144 /src/or/buffers.c | |
parent | 3eb8c9e50f046a9b8de6e08878a41af9737b39b2 (diff) | |
download | tor-8f7940348fcf76596229d67b52e15bf3d9f24852.tar.gz tor-8f7940348fcf76596229d67b52e15bf3d9f24852.zip |
Avoid an infinite loop on evil controlport input. Fixes bug 350,
unless it doesn't. (Nick, please confirm.)
Backport candidate.
svn:r8844
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index b1f2673c64..421ab43337 100644 --- a/src/or/buffers.c +++ b/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); |