Browse Source

Patch from "Cho, Seong-Myun" <smcho@xecurenexus.com> to limit
things to the lower 16 bits of 'id'.

Eric Andersen 21 năm trước cách đây
mục cha
commit
74f5887007
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      libc/inet/resolv.c

+ 3 - 1
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;