mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 22:47:12 +01:00
Avoid an infinite loop on evil controlport input. Fixes bug 350,
unless it doesn't. (Nick, please confirm.) Backport candidate. svn:r8844
This commit is contained in:
parent
3eb8c9e50f
commit
8f7940348f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue