1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* include/arpa/nameser.h: Also optimize NS_PUT16 and NS_PUT32.

* resolv/res_mkquery.c: Use NS_PUT16 and NS_PUT32 instead of __putshort
	and __putlong respectively.  Correct buffer overflow check for
	NS_NOTIFY_OP.

	* resolv/res_send.c (send_vc): Use ns_put16 instead of putshort.
This commit is contained in:
Ulrich Drepper
2006-05-06 18:04:35 +00:00
parent 8e45b1acc2
commit bce1646770
4 changed files with 47 additions and 30 deletions

View File

@ -674,7 +674,7 @@ send_vc(res_state statp,
/*
* Send length & message
*/
putshort((u_short)buflen, (u_char*)&len);
ns_put16((u_short)buflen, (u_char*)&len);
evConsIovec(&len, INT16SZ, &iov[0]);
evConsIovec((void*)buf, buflen, &iov[1]);
if (TEMP_FAILURE_RETRY (writev(statp->_vcsock, iov, 2))