mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 08:38:42 +00:00
Fixed infinite recursion in password_same.
Pavel, please check.
This commit is contained in:
parent
32749f493f
commit
8c6ce98b9d
@ -53,13 +53,20 @@ password_strncpy(char *to, char *from, int len)
|
|||||||
|
|
||||||
int
|
int
|
||||||
password_same(struct password_item *old, struct password_item *new)
|
password_same(struct password_item *old, struct password_item *new)
|
||||||
|
{
|
||||||
|
for(;;)
|
||||||
{
|
{
|
||||||
if (old == new)
|
if (old == new)
|
||||||
return 1;
|
return 1;
|
||||||
if ((!old) || (!new))
|
if (!old || !new)
|
||||||
return 0;
|
return 0;
|
||||||
return ((old->from == new->from) &&
|
if (old->from != new->from ||
|
||||||
(old->to == new->to) &&
|
old->to != new->to ||
|
||||||
(old->passive == new->passive) &&
|
old->passive != new->passive ||
|
||||||
password_same(old, new));
|
old->id != new->id ||
|
||||||
|
strcmp(old->password, new->password))
|
||||||
|
return 0;
|
||||||
|
old = old->next;
|
||||||
|
new = new->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user