aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-10-26 03:53:09 -0400
committerMike Frysinger <vapier@gentoo.org>2009-10-26 03:53:09 -0400
commitbf79706bc65de415cb0dd82aeba55164cd4cca96 (patch)
tree31f74e401d621a7e161ca2b9e62d1a09e7c027b9 /libsandbox/wrappers.c
parentbump to sandbox-2.3 (diff)
downloadsandbox-bf79706bc65de415cb0dd82aeba55164cd4cca96.tar.gz
sandbox-bf79706bc65de415cb0dd82aeba55164cd4cca96.tar.bz2
sandbox-bf79706bc65de415cb0dd82aeba55164cd4cca96.zip
libsandbox: use mmap directly for internal memory
Some packages that do library tricks like sandbox override the mmap() symbols. If their implementation ends up calling functions that sandbox has overridden, then we can easily hit an infinite loop. sb-fopen -> sb-malloc -> external mmap -> sb-open -> whoops! So for the internal memory functions, make sure we call directly to the C library's mmap() functions. This way our internal memory implementation should be free from external forces. URL: http://bugs.gentoo.org/290249 Reported-by: Diego E. Pettenò <flameeyes@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox/wrappers.c')
-rw-r--r--libsandbox/wrappers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsandbox/wrappers.c b/libsandbox/wrappers.c
index f587614..42b2df1 100644
--- a/libsandbox/wrappers.c
+++ b/libsandbox/wrappers.c
@@ -34,7 +34,7 @@ static void load_libc_handle(void)
}
}
-static void *get_dlsym(const char *symname, const char *symver)
+void *get_dlsym(const char *symname, const char *symver)
{
void *symaddr;