diff options
author | Yang Tse <yangsita@gmail.com> | 2009-10-10 12:31:27 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-10-10 12:31:27 +0000 |
commit | e804725e7535dfe1dbb45ae560e800a2e242084f (patch) | |
tree | 9c54ef34a51bfcbbc3909c889608a5f1bcc5b585 /bitncmp.c | |
parent | ec11480d8b4da758263b187ba81a54f08aa883a0 (diff) | |
download | c-ares-e804725e7535dfe1dbb45ae560e800a2e242084f.tar.gz c-ares-e804725e7535dfe1dbb45ae560e800a2e242084f.tar.bz2 c-ares-e804725e7535dfe1dbb45ae560e800a2e242084f.zip |
Fix potential out-of-bounds read
Diffstat (limited to 'bitncmp.c')
-rw-r--r-- | bitncmp.c | 2 |
1 files changed, 1 insertions, 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]; |