]> git.saurik.com Git - apple/libc.git/blob - net/FreeBSD/nsap_addr.c.patch
3200248cfb0aa4d5cb87918ad9a848eb1ecef62d
[apple/libc.git] / net / FreeBSD / nsap_addr.c.patch
1 --- nsap_addr.c.orig Fri Mar 22 13:52:29 2002
2 +++ nsap_addr.c Sat May 3 14:17:44 2003
3 @@ -26,6 +26,7 @@
4 #include <arpa/nameser.h>
5 #include <ctype.h>
6 #include <resolv.h>
7 +#include <stdlib.h>
8
9 static char
10 xtob(c)
11 @@ -78,9 +79,14 @@
12 {
13 int nib;
14 int i;
15 - static char tmpbuf[255*3];
16 + static char *tmpbuf = NULL;
17 char *start;
18
19 + if (tmpbuf == NULL) {
20 + tmpbuf = malloc(255*3);
21 + if (tmpbuf == NULL)
22 + return NULL;
23 + }
24 if (ascii)
25 start = ascii;
26 else {