瀏覽代碼

Merge remote-tracking branch 'public/feature21496'

Nick Mathewson 7 年之前
父節點
當前提交
a783c5cbae
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 4 0
      changes/bug21496
  2. 3 0
      src/or/routerparse.c

+ 4 - 0
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.

+ 3 - 0
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);
   }