aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-03-15 10:59:30 -0400
committerNick Mathewson <nickm@torproject.org>2017-03-15 10:59:30 -0400
commita783c5cbaedc88842f76584b96c89a765713f78a (patch)
treee192b66f817face18df21f5e897509ecb17cf850
parent31c9bdadbe3ac4d2b7aa8d8036ccf10643b986f8 (diff)
parent5203cd2f11a1419db57d067d2713c2118787d0c3 (diff)
downloadtor-a783c5cbaedc88842f76584b96c89a765713f78a.tar.gz
tor-a783c5cbaedc88842f76584b96c89a765713f78a.zip
Merge remote-tracking branch 'public/feature21496'
-rw-r--r--changes/bug214964
-rw-r--r--src/or/routerparse.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/changes/bug21496 b/changes/bug21496
new file mode 100644
index 0000000000..24ac85a769
--- /dev/null
+++ b/changes/bug21496
@@ -0,0 +1,4 @@
+ o Minor features (safety):
+ - Add an explict check to extrainfo_parse_entry_from_string() for NULL
+ inputs. We don't believe this can actually happen, but it may help
+ silence a warning from the Clang analyzer. Closes ticket 21496.
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 0336c035b4..c4f329513c 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2030,6 +2030,9 @@ extrainfo_parse_entry_from_string(const char *s, const char *end,
* parse that's covered by the hash. */
int can_dl_again = 0;
+ if (BUG(s == NULL))
+ return NULL;
+
if (!end) {
end = s + strlen(s);
}