[uClibc-cvs] uClibc/libc/inet resolv.c,1.48,1.49
Erik Andersen
andersen at uclibc.org
Sun Oct 19 00:28:51 UTC 2003
Update of /var/cvs/uClibc/libc/inet
In directory winder:/tmp/cvs-serv16424
Modified Files:
resolv.c
Log Message:
We were failing to properly set h_errno on success, which could
cause gethostbyaddr_r to keep looping allocating more and more
memory each time till alloca finally caused a segfault. Ugh.
This fixes that as well...
-Erik
Index: resolv.c
===================================================================
RCS file: /var/cvs/uClibc/libc/inet/resolv.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- resolv.c 15 Oct 2003 09:04:40 -0000 1.48
+++ resolv.c 19 Oct 2003 00:28:47 -0000 1.49
@@ -1755,6 +1755,7 @@
}
*result=result_buf;
+ *h_errnop = NETDB_SUCCESS;
return NETDB_SUCCESS;
}
#endif
@@ -1882,6 +1883,7 @@
}
*result=result_buf;
+ *h_errnop = NETDB_SUCCESS;
return NETDB_SUCCESS;
#endif /* __UCLIBC_HAS_IPV6__ */
}
@@ -2064,6 +2066,7 @@
}
*result=result_buf;
+ *h_errnop = NETDB_SUCCESS;
return NETDB_SUCCESS;
}
#endif
More information about the uClibc-cvs
mailing list