diff options
-rw-r--r-- | src/or/router.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c index cdc6994959..634ed4122b 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1205,7 +1205,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, if (result < 0) return -1; written += result; - if (written < maxlen+2) + if (written+2 > maxlen) return -1; s[written++] = '\n'; } |