diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
| commit | 6e425a9de8c003b5a733621a6b6730ec3cc902b8 (patch) | |
| tree | 314123bcab78ff295f38f85f31dc141e5fe22d15 /emu/FreeBSD/ipif.c | |
| parent | 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff) | |
20061220
Diffstat (limited to 'emu/FreeBSD/ipif.c')
| -rw-r--r-- | emu/FreeBSD/ipif.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/emu/FreeBSD/ipif.c b/emu/FreeBSD/ipif.c index 491eff15..07065714 100644 --- a/emu/FreeBSD/ipif.c +++ b/emu/FreeBSD/ipif.c @@ -273,7 +273,8 @@ int so_gethostbyname(char *host, char**hostv, int n) { int i; - unsigned char buf[32], *p; + char buf[32]; + uchar *p; struct hostent *hp; hp = gethostbyname(host); @@ -282,7 +283,7 @@ so_gethostbyname(char *host, char**hostv, int n) for(i = 0; hp->h_addr_list[i] && i < n; i++) { p = hp->h_addr_list[i]; - sprint(buf, "%ud.%ud.%ud.%ud", p[0], p[1], p[2], p[3]); + snprint(buf, sizeof(buf), "%ud.%ud.%ud.%ud", p[0], p[1], p[2], p[3]); hostv[i] = strdup(buf); if(hostv[i] == 0) break; |
