Commit 7483aef8 authored by Nick Mathewson's avatar Nick Mathewson

avoid a signed/unsigned comparison.

parent 240bb177
......@@ -201,7 +201,7 @@ parse_single_entry(const char *s, const char *end_of_entry)
goto error;
/* The name must not be longer than MAX_PROTOCOL_NAME_LENGTH. */
if (equals - s > MAX_PROTOCOL_NAME_LENGTH) {
if (equals - s > (int)MAX_PROTOCOL_NAME_LENGTH) {
log_warn(LD_NET, "When parsing a protocol entry, I got a very large "
"protocol name. This is possibly an attack or a bug, unless "
"the Tor network truly supports protocol names larger than "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment