(res_nmkquery): Reject randombits value if low 16 bits are zero.
authordrepper <drepper>
Wed, 6 Oct 2004 18:27:36 +0000 (18:27 +0000)
committerdrepper <drepper>
Wed, 6 Oct 2004 18:27:36 +0000 (18:27 +0000)
resolv/res_mkquery.c

index 5b705b0..9825ae0 100644 (file)
@@ -141,7 +141,7 @@ res_nmkquery(res_state statp,
            randombits = (tv.tv_sec << 8) ^ tv.tv_usec;
 #endif
          }
-       while (randombits == 0);
+       while ((randombits & 0xffff) == 0);
        statp->id = (statp->id + randombits) & 0xffff;
 #endif
        hp->opcode = op;