Wipe all of the target space in tor_addr_{to,from}_sockaddr()

Otherwise we risk a subsequent memdup or memcpy copying
uninitialized RAM into some other place that might eventually expose
it.  Let's make sure that doesn't happen.

Closes ticket 14041
This commit is contained in:
Nick Mathewson
2014-12-29 10:06:12 -05:00
parent e85f0c650c
commit d7ecdd645a
2 changed files with 10 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
o Minor features (security):
- Clear all memory targetted by tor_addr_{to,from}_sockaddr(),
not just the part that's used. This makes it harder for data leak
bugs to occur in the event of other programming failures.
Resolves ticket 14041.