summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c2
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';
}