aboutsummaryrefslogtreecommitdiff
path: root/src/or/parsecommon.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-10-25 09:14:06 -0400
committerNick Mathewson <nickm@torproject.org>2018-10-25 09:14:06 -0400
commit8013e3e8b6af4170f622765a0fb1a219131028bd (patch)
tree6ecc0b00309faaffc19577114a0db6fbcc07e91b /src/or/parsecommon.c
parentb2c52f5d6d52a70e11bb4f60036dd6772b55661a (diff)
parent0878bb961f9028a81ce465702afb891a82015228 (diff)
downloadtor-8013e3e8b6af4170f622765a0fb1a219131028bd.tar.gz
tor-8013e3e8b6af4170f622765a0fb1a219131028bd.zip
Merge branch 'bug28202_029' into bug28202_033
Diffstat (limited to 'src/or/parsecommon.c')
-rw-r--r--src/or/parsecommon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/parsecommon.c b/src/or/parsecommon.c
index 6c3dd3100e..e7d01a5029 100644
--- a/src/or/parsecommon.c
+++ b/src/or/parsecommon.c
@@ -345,7 +345,7 @@ get_next_token(memarea_t *area,
goto check_object;
obstart = *s; /* Set obstart to start of object spec */
- if (*s+16 >= eol || memchr(*s+11,'\0',eol-*s-16) || /* no short lines, */
+ if (eol - *s <= 16 || memchr(*s+11,'\0',eol-*s-16) || /* no short lines, */
strcmp_len(eol-5, "-----", 5) || /* nuls or invalid endings */
(eol-*s) > MAX_UNPARSED_OBJECT_SIZE) { /* name too long */
RET_ERR("Malformed object: bad begin line");
@@ -448,4 +448,3 @@ find_all_by_keyword(const smartlist_t *s, directory_keyword k)
});
return out;
}
-