Explorar el Código

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

Eric Andersen hace 21 años
padre
commit
74f5887007
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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;