]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a fun heisenbug in memoize_protover_flags()
authorNick Mathewson <nickm@torproject.org>
Wed, 21 Nov 2018 12:38:38 +0000 (07:38 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 21 Nov 2018 12:56:33 +0000 (07:56 -0500)
After we clear the protover map for getting full, we need to
re-create it, since we are about to use it.

This is a bugfix for bug 28558. It is a bugfix for the code from
ticket 27225, which is not in any released Tor.  Found by Google
OSS-Fuzz, as issue 11475.

src/core/or/versions.c

index 6f8eea7a672775e2ca610921ec34adda68c621fa..5d4effcaf843ad699505ee6d38d08492cdcc81f3 100644 (file)
@@ -399,6 +399,7 @@ memoize_protover_summary(protover_summary_flags_t *out,
 
   if (strmap_size(protover_summary_map) >= MAX_PROTOVER_SUMMARY_MAP_LEN) {
     protover_summary_cache_free_all();
+    protover_summary_map = strmap_new();
   }
 
   const protover_summary_flags_t *cached =