mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Handle unexpected whitespace better in malformed descriptors. Bug
found using Benedikt Boss's new Tor fuzzer! Bugfix on 0.2.0.x. svn:r11229
This commit is contained in:
parent
4ff3343e98
commit
05f12bffe9
@ -1,4 +1,8 @@
|
|||||||
Changes in version 0.2.0.6-alpha - 2007-??-??
|
Changes in version 0.2.0.6-alpha - 2007-??-??
|
||||||
|
o Major bugfixes:
|
||||||
|
- Handle unexpected whitespace better in malformed descriptors. Bug
|
||||||
|
found using Benedikt Boss's new Tor fuzzer! Bugfix on 0.2.0.x.
|
||||||
|
|
||||||
o Minor bugfixes (bridges):
|
o Minor bugfixes (bridges):
|
||||||
- Do not intermix bridge routers with controller-added routers. (Bugfix
|
- Do not intermix bridge routers with controller-added routers. (Bugfix
|
||||||
on 0.2.0.x)
|
on 0.2.0.x)
|
||||||
|
@ -534,12 +534,12 @@ eat_whitespace_eos(const char *s, const char *eos)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return a pointer to the first char of s that is not a space or a tab,
|
/** Return a pointer to the first char of s that is not a space or a tab
|
||||||
* or to the terminating NUL if no such character exists. */
|
* or a \\r, or to the terminating NUL if no such character exists. */
|
||||||
const char *
|
const char *
|
||||||
eat_whitespace_no_nl(const char *s)
|
eat_whitespace_no_nl(const char *s)
|
||||||
{
|
{
|
||||||
while (*s == ' ' || *s == '\t')
|
while (*s == ' ' || *s == '\t' || *s == '\r')
|
||||||
++s;
|
++s;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
@ -549,7 +549,7 @@ eat_whitespace_no_nl(const char *s)
|
|||||||
const char *
|
const char *
|
||||||
eat_whitespace_eos_no_nl(const char *s, const char *eos)
|
eat_whitespace_eos_no_nl(const char *s, const char *eos)
|
||||||
{
|
{
|
||||||
while (s < eos && (*s == ' ' || *s == '\t'))
|
while (s < eos && (*s == ' ' || *s == '\t' || *s == '\r'))
|
||||||
++s;
|
++s;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user