瀏覽代碼

stop reading uninitialized/outofbounds memory. possible backport,
quite related to bug 455.


svn:r10835

Roger Dingledine 18 年之前
父節點
當前提交
4b719cbae0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/or/routerparse.c

+ 1 - 1
src/or/routerparse.c

@@ -892,7 +892,7 @@ router_parse_list_from_string(const char **s, const char *eos,
     }
     end = tor_memstr(*s, eos-*s, "\nrouter-signature");
     if (end)
-      end = tor_memstr(end, eos-*s, "\n-----END SIGNATURE-----\n");
+      end = tor_memstr(end, eos-end, "\n-----END SIGNATURE-----\n");
     if (end)
       end += strlen("\n-----END SIGNATURE-----\n");