diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-05-22 14:12:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-05-22 14:12:44 -0400 |
commit | 7483aef896654a02ae1fa7ae616fbd1f2c27f3c5 (patch) | |
tree | 3d9661a4e4f764b65ce8be263eea8fcedbcdf45a | |
parent | 240bb177140099690213dfc524a235abd2aa0eb8 (diff) | |
download | tor-7483aef896654a02ae1fa7ae616fbd1f2c27f3c5.tar.gz tor-7483aef896654a02ae1fa7ae616fbd1f2c27f3c5.zip |
avoid a signed/unsigned comparison.
-rw-r--r-- | src/or/protover.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/protover.c b/src/or/protover.c index ae6cda092b..13dd6549e8 100644 --- a/src/or/protover.c +++ b/src/or/protover.c @@ -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 " |