|
|||||||||||
|
user/3043: netcat (nc) dumps core
From: Csaba Simon <secsaba(at)yahoo.com>
Date: Fri Dec 20 2002 - 04:35:34 EST
System : OpenBSD 3.2 Architecture: OpenBSD.i386 Machine : i386 >Fix: Apply the above patch:
/* Load ports sequentially */ for (cp = lo; cp <= hi; cp++) {
- if ((portlist[x] = calloc(1, 6)) == NULL)
- errx (1, "not enough memory");
- snprintf(portlist[x], 6, "%d", cp);
+ portlist[x] = calloc(1, PORT_MAX);
+ snprintf(portlist[x], PORT_MAX, "%d", cp);
x++;
} @@ -677,9 +676,8 @@
hi = (int)strtoul(p, &endp, 10);
errx(1, "port range not valid"); - if ((portlist[0] = calloc(1, 6)) == NULL) - errx (1, "not enough memory"); - snprintf(portlist[0], 6, "%d", hi); + portlist[0] = calloc(1, PORT_MAX); + portlist[0] = p; } } Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com >Release-Note:
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:40 EDT |
||||||||||
|
|||||||||||