# HG changeset patch # User Nathan Walp # Date 1082821388 0 # Node ID 28c0ebfd7a53de7204794f3febdcf065ff4db58a # Parent 0f2af117d5d3e09fa41df560a70e54725cc88e75 [gaim-migrate @ 9560] i'm back, with half the horsepower, and even less overheating :-/ committer: Tailor Script diff -r 0f2af117d5d3 -r 28c0ebfd7a53 src/proxy.c --- a/src/proxy.c Sat Apr 24 14:14:05 2004 +0000 +++ b/src/proxy.c Sat Apr 24 15:43:08 2004 +0000 @@ -396,7 +396,7 @@ static void cope_with_gdb_brokenness() { static gboolean already_done = FALSE; - char s[300], e[300]; + char s[256], e[512]; int n; pid_t ppid; @@ -405,10 +405,13 @@ return; already_done = TRUE; ppid = getppid(); - snprintf(s, 300, "/proc/%d/exe", ppid); + snprintf(s, sizeof(s), "/proc/%d/exe", ppid); n = readlink(s, e, sizeof(e)); + if(n < 0) + return; + e[MIN(n,sizeof(e)-1)] = '\0'; - + if(strstr(e,"gdb")) { gaim_debug(GAIM_DEBUG_INFO, "dns", "Debugger detected, performing useless query...\n");