//char hostbuf[256];
char line[512];
FILE *f, _f;
- unsigned char _buf[64];
+ unsigned char _buf[1024];
char *z;
int result;
int cnt;
if (serv) {
if (!*serv) return EAI_SERVICE;
- port = strtoul(serv, &z, 0);
+ port = strtoul(serv, &z, 10);
if (!*z && port > 65535) return EAI_SERVICE;
if (!port) {
if (flags & AI_NUMERICSERV) return EAI_SERVICE;