summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex/engine.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-12-24 02:44:52 +0000
committerwpaul <wpaul@FreeBSD.org>1996-12-24 02:44:52 +0000
commitd99939c736aca9e71967d283a2ca32bb8ba0c564 (patch)
treee2cd5added12483e83950c4fdd1088c6a9f1d241 /lib/libc/regex/engine.c
parent4ab0d63c8aed49b7d37e4c8f3557febdad48a701 (diff)
downloadFreeBSD-src-d99939c736aca9e71967d283a2ca32bb8ba0c564.zip
FreeBSD-src-d99939c736aca9e71967d283a2ca32bb8ba0c564.tar.gz
Fix some bugs:
- Don't dereference a NULL hostent pointer (if T_PTR lookup fails). - Today I asked myself: "Self, you wrote this nifty async resolver that does a great job handling delayed replies to clients using the UDP transport, and the yplib code in libc always uses UDP (except for yp_all()). But what if some dork makes a DNS lookup using TCP?" Being the only dork on hand at the time, I tried it and was enlightened. As I suspected, my transaction ID frobbing hacks cause fireworks if called on a TCP transport handle (duh: the structures are different). Fix: check the type of socket in xprt->xp_sock using getsockopt() and don't use svcudp_get_xid() and svcudp_set_xid() for anything except SOCK_DGRAM sockets. (Since accept() gives you a new socket for each connection, the transaction ID munging isn't needed for TCP anyway.)
Diffstat (limited to 'lib/libc/regex/engine.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud