2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

2369. [bug] libbind: Array bounds overrun on read in bitncmp().

[RT #18054]
This commit is contained in:
Mark Andrews
2008-05-12 00:17:27 +00:00
parent 6fbe9050cb
commit e1aeb1569a
2 changed files with 5 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
2369. [bug] libbind: Array bounds overrun on read in bitncmp().
[RT #18054]
2368. [port] Linux: use libcap for capability management if
possible. [RT# 18026]

View File

@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: bitncmp.c,v 1.3 2005/04/27 04:56:35 sra Exp $";
static const char rcsid[] = "$Id: bitncmp.c,v 1.4 2008/05/12 00:17:27 marka Exp $";
#endif
#include "port_before.h"
@@ -48,7 +48,7 @@ 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 u_char *)l)[b];