In crypto/compat/arc4random_linux.h line 79 you unmap pages during
an error condition, but you unmap the one that failed instead of the
one that succeeded. This would cause a memory leak if the program
wasn't headed for an abort(). The fix is the remove the letter 'x'
twice.
--- crypto/compat/arc4random_linux.h.orig 2014-08-08
23:51:51.226892215 -0400
+++ crypto/compat/arc4random_linux.h 2014-08-08
23:51:55.858810954
-0400
@@ -76,7 +76,7 @@
if ((*rsxp = mmap(NULL, sizeof(**rsxp), PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
- munmap(*rsxp, sizeof(**rsxp));
+ munmap(*rsp, sizeof(**rsp));
return (-1);
}
I have a couple of other minor bugs, but will send them as separately
so they can be tracked more easily.
--
Paul Maurers
[email protected]