mirror of
https://github.com/curl/curl.git
synced 2026-06-19 19:46:22 +03:00
Fix potential out-of-bounds read
This commit is contained in:
parent
640e49976f
commit
4d9279cb3b
1 changed files with 1 additions and 1 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue