openbsd-ports/net/gaim/patches/patch-src_proxy_c
brad b8c765b767 Fix a number of buffer overflows.
http://security.e-matters.de/advisories/012004.html

Thanks to Matthew Luckie for bringing this to my attention.
2004-01-27 01:03:54 +00:00

22 lines
795 B
Plaintext

$OpenBSD: patch-src_proxy_c,v 1.3 2004/01/27 01:03:54 brad Exp $
--- src/proxy.c.orig 2004-01-09 23:04:56.000000000 -0500
+++ src/proxy.c 2004-01-26 19:40:34.000000000 -0500
@@ -462,7 +462,7 @@ static void trap_gdb_bug()
fputs("\n* * *\n",stderr);
fputs(message,stderr);
fputs("* * *\n\n",stderr);
- execlp("xmessage","xmessage","-center", message, NULL);
+ execlp("xmessage","xmessage","-center", message, (void *)NULL);
_exit(1);
}
@@ -974,7 +974,7 @@ http_canread(gpointer data, gint source,
gaim_input_remove(phb->inpa);
- while ((nlc != 2) && (read(source, &inputline[pos++], 1) == 1)) {
+ while ((pos < sizeof(inputline)-1) && (nlc != 2) && (read(source, &inputline[pos++], 1) == 1)) {
if (inputline[pos - 1] == '\n')
nlc++;
else if (inputline[pos - 1] != '\r')