Explorar o código

added contingency message to test for sandbox_getaddrinfo

Cristian Toader %!s(int64=11) %!d(string=hai) anos
pai
achega
fe6e2733ab
Modificáronse 2 ficheiros con 4 adicións e 2 borrados
  1. 2 1
      src/common/sandbox.c
  2. 2 1
      src/or/main.c

+ 2 - 1
src/common/sandbox.c

@@ -930,6 +930,7 @@ sandbox_getaddrinfo(const char *name, struct addrinfo **res)
     }
   }
 
+  log_err(LD_BUG,"(Sandbox) failed to get address %s!", name);
   return -1;
 }
 
@@ -958,7 +959,7 @@ sandbox_add_addrinfo(const char* name)
     goto out;
   }
 
-  el->name = strdup(name);
+  el->name = tor_strdup(name);
   el->next = sb_addr_info;
   sb_addr_info = el;
 

+ 2 - 1
src/or/main.c

@@ -2640,7 +2640,8 @@ find_flashcard_path(PWCHAR path, size_t size)
 #endif
 
 static void
-init_addrinfo(void) {
+init_addrinfo(void)
+{
   char hname[256];
 
   // host name to sandbox