From 2c0487ecfb410d1361b114e60d8e9ffd2ed092ec Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 11 Nov 2017 13:56:35 -0500 Subject: Handle NULL input to protover_compute_for_old_tor() Fixes bug 24245; bugfix on 0.2.9.4-alpha. TROVE-2017-010. --- src/or/protover.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/or/protover.c') diff --git a/src/or/protover.c b/src/or/protover.c index 0a4d4fb8fd..98957cabdf 100644 --- a/src/or/protover.c +++ b/src/or/protover.c @@ -694,6 +694,11 @@ protocol_list_contains(const smartlist_t *protos, const char * protover_compute_for_old_tor(const char *version) { + if (version == NULL) { + /* No known version; guess the oldest series that is still supported. */ + version = "0.2.5.15"; + } + if (tor_version_as_new_as(version, FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS)) { return ""; -- cgit v1.2.3-54-g00ecf