Fix stupid error in allocating 0x20-flip bitmaps.

This commit is contained in:
Simon Kelley
2025-02-21 14:41:34 +00:00
parent dbb69bd192
commit 5990074ab0

View File

@@ -293,8 +293,9 @@ static void forward_query(int udpfd, union mysockaddr *udpaddr,
if (gobig && !bitvector)
{
casediff = (i/BITS_IN_INT) + 1; /* length of array */
if ((bitvector = whine_malloc(casediff)))
casediff = ((i - 1)/BITS_IN_INT) + 1; /* length of array */
/* whine_malloc() zeros memory */
if ((bitvector = whine_malloc(casediff * sizeof(unsigned int))))
goto big_redo;
}
}