avoid heap overrun
Obtained from: KAME MFC after: 1 day
This commit is contained in:
parent
ec17f77885
commit
20b21e2a36
@ -656,7 +656,7 @@ get_prefix(struct rainfo *rai)
|
||||
memcpy(&pp->prefix, a, sizeof(*a));
|
||||
p = (u_char *)&pp->prefix;
|
||||
ep = (u_char *)(&pp->prefix + 1);
|
||||
while (m < lim)
|
||||
while (m < lim && p < ep)
|
||||
*p++ &= *m++;
|
||||
while (p < ep)
|
||||
*p++ = 0x00;
|
||||
|
Loading…
x
Reference in New Issue
Block a user