[tor-commits] [tor/master] Break up <??> differently, and explain why

nickm at torproject.org nickm at torproject.org
Thu Aug 15 16:16:46 UTC 2013


commit 6dd8ff0ad9cf32ab7b22d1e2c9fc24477300fa4f
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Jul 16 13:44:00 2013 -0400

    Break up <??> differently, and explain why
---
 src/or/ext_orport.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/or/ext_orport.c b/src/or/ext_orport.c
index cd8ab2d..72dbaa5 100644
--- a/src/or/ext_orport.c
+++ b/src/or/ext_orport.c
@@ -515,8 +515,11 @@ connection_ext_or_process_inbuf(or_connection_t *or_conn)
 
       /* If the transport proxy did not use the TRANSPORT command to
        * specify the transport name, mark this as unknown transport. */
-      if (!or_conn->ext_or_transport)
-        or_conn->ext_or_transport = tor_strdup("<?\?>");
+      if (!or_conn->ext_or_transport) {
+        /* We write this string this way to avoid ??>, which is a C
+         * trigraph. */
+        or_conn->ext_or_transport = tor_strdup("<?" "?>");
+      }
 
       connection_write_ext_or_command(conn, EXT_OR_CMD_BT_OKAY, NULL, 0);
 





More information about the tor-commits mailing list