summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-03 14:04:05 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-03 14:04:05 +0000
commit74f5887007f45401e6a8933d7da96ddef02f9940 (patch)
treeec90602c77678eb9445138c8757e74a1681a2076 /libc/inet
parent772cb310c5745ea7de140ecdea3fd1edb2c964c6 (diff)
Patch from "Cho, Seong-Myun" <smcho@xecurenexus.com> to limit
things to the lower 16 bits of 'id'.
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/resolv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index 62b091770..e6ac9d9ce 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -641,7 +641,9 @@ int __dns_lookup(const char *name, int type, int nscount, char **nsip,
/* Mess with globals while under lock */
LOCK;
- h.id = ++id;
+ ++id;
+ id &= 0xffff;
+ h.id = id;
dns = nsip[ns];
UNLOCK;