summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c
index a88de12d69..cc917c46aa 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1572,7 +1572,8 @@ munge_extrainfo_into_routerinfo(const char *ri_body,
if (!(cp = tor_memstr(ei_body, ei_len, kwd)))
continue;
++cp;
- eol = memchr(cp, '\n', ei_len - (cp-ei_body));
+ if (!(eol = memchr(cp, '\n', ei_len - (cp-ei_body))))
+ continue;
memcpy(outp, cp, eol-cp+1);
outp += eol-cp+1;
}