~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sel/bres-adns.c: Fix incorrect array bound.
[mLib]
/
sel
/
bres-adns.c
diff --git
a/sel/bres-adns.c
b/sel/bres-adns.c
index
0d93ab0
..
03fafa4
100644
(file)
--- a/
sel/bres-adns.c
+++ b/
sel/bres-adns.c
@@
-217,7
+217,7
@@
static void report(bres_client *rc, adns_answer *a,
for (i = 0; i < nn && j < N(n) - 1; i++)
if (strcmp(n[0], nv[i]) != 0) n[j++] = nv[i];
n[j++] = 0;
for (i = 0; i < nn && j < N(n) - 1; i++)
if (strcmp(n[0], nv[i]) != 0) n[j++] = nv[i];
n[j++] = 0;
- for (i = j = 0; i < an && j < N(a
v
) - 1; i++) {
+ for (i = j = 0; i < an && j < N(a
a
) - 1; i++) {
if (av[i].addr.sa.sa_family == AF_INET)
aa[j++] = (char *)&av[i].addr.inet.sin_addr;
}
if (av[i].addr.sa.sa_family == AF_INET)
aa[j++] = (char *)&av[i].addr.inet.sin_addr;
}