Fix potential out-of-bounds read
This commit is contained in:
@@ -41,7 +41,7 @@ ares_bitncmp(const void *l, const void *r, int n) {
|
||||
|
||||
b = n / 8;
|
||||
x = memcmp(l, r, b);
|
||||
if (x)
|
||||
if (x || (n % 8) == 0)
|
||||
return (x);
|
||||
|
||||
lb = ((const unsigned char *)l)[b];
|
||||
|
||||
Reference in New Issue
Block a user