Explorar el Código

Avoid a segfault when reading an encrypted key that isn't there

Patch from cypherpunks. Fixes bug 16449. Bug not in any released tor.
Nick Mathewson hace 10 años
padre
commit
48f69685f5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/or/routerkeys.c

+ 1 - 1
src/or/routerkeys.c

@@ -63,7 +63,7 @@ read_encrypted_secret_key(ed25519_secret_key_t *out,
   r = 1;
 
  done:
-  memwipe(encrypted_key, 0, encrypted_len);
+  memwipe(encrypted_key, 0, sizeof(encrypted_key));
   memwipe(pwbuf, 0, sizeof(pwbuf));
   tor_free(tag);
   if (secret) {