]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Avoid dereferencing NULL if a bridge fails to build an ei descriptor.
authorRobert Ransom <rransom.8774@gmail.com>
Wed, 24 Nov 2010 15:50:29 +0000 (07:50 -0800)
committerRobert Ransom <rransom.8774@gmail.com>
Wed, 24 Nov 2010 21:18:11 +0000 (13:18 -0800)
Reported by an anonymous commenter on Trac.

changes/fix2195-fix [new file with mode: 0644]
src/or/router.c

diff --git a/changes/fix2195-fix b/changes/fix2195-fix
new file mode 100644 (file)
index 0000000..9f03c24
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+    - Do not dereference NULL if a bridge fails to build its
+      extra-info descriptor. Previously, we would have dereferenced
+      NULL. Found by an anonymous commenter on Trac. Bugfix on
+      0.2.2.19-alpha.
+
index 3d4ee70399856520cc947ac040f343e096e1638c..66ef8ec52ed9de0e003cdf9db8c31507f6234231 100644 (file)
@@ -1523,7 +1523,7 @@ router_rebuild_descriptor(int force)
   /* Let bridges serve their own descriptors unencrypted, so they can
    * pass reachability testing. (If they want to be harder to notice,
    * they can always leave the DirPort off). */
-  if (!options->BridgeRelay)
+  if (ei && !options->BridgeRelay)
     ei->cache_info.send_unencrypted = 1;
 
   router_get_router_hash(ri->cache_info.signed_descriptor_body,