1
0
mirror of https://github.com/rofl0r/proxychains-ng synced 2026-05-17 03:02:41 +08:00

fix segfault in DNS mapping lookup code

the allocatorthread got pointers to RAM which were reallocated
behind the back, and if realloc() couldn't grow in-place, lead
to segfaults in applications that do a lot of DNS-lookups such
as webbrowsers.

closes #66
closes #31

thanks to @ravomavain for tracking down the issue.
This commit is contained in:
rofl0r
2015-06-06 11:41:36 +01:00
Unverified
parent 53c6c2ca9b
commit 2182eff358
8 changed files with 8 additions and 103 deletions
-3
View File
@@ -95,15 +95,12 @@ static void* load_sym(char* symname, void* proxyfunc) {
#define SETUP_SYM(X) do { true_ ## X = load_sym( # X, X ); } while(0)
#include "shm.h"
#include "allocator_thread.h"
#include "stringdump.h"
const char *proxychains_get_version(void);
static void do_init(void) {
srand(time(NULL));
dumpstring_init(); // global string garbage can
core_initialize();
at_init();