[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torsocks/master] accept4: Initialize libc symbol early
commit e4601e0f89b47c5aff9df30238a10224e8bd04a6
Author: David Goulet <dgoulet@xxxxxxxxx>
Date: Fri Apr 20 09:01:17 2018 -0400
accept4: Initialize libc symbol early
Fixes #17618
Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
src/lib/torsocks.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib/torsocks.c b/src/lib/torsocks.c
index 731b33c..b7e7cdd 100644
--- a/src/lib/torsocks.c
+++ b/src/lib/torsocks.c
@@ -234,8 +234,9 @@ static void init_libc_symbols(void)
tsocks_libc_socket = dlsym(libc_ptr, LIBC_SOCKET_NAME_STR);
tsocks_libc_syscall = dlsym(libc_ptr, LIBC_SYSCALL_NAME_STR);
tsocks_libc_execve = dlsym(libc_ptr, LIBC_EXECVE_NAME_STR);
- if (!tsocks_libc_connect || !tsocks_libc_close || !tsocks_libc_socket
- || !tsocks_libc_syscall || !tsocks_libc_execve) {
+ tsocks_libc_accept4 = dlsym(libc_ptr, LIBC_ACCEPT4_NAME_STR);
+ if (!tsocks_libc_connect || !tsocks_libc_close || !tsocks_libc_socket ||
+ !tsocks_libc_syscall || !tsocks_libc_execve || ! tsocks_libc_accept4) {
ERR("Unable to lookup symbols in " LIBC_NAME "(%s)", dlerror());
goto error;
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits