Password WALK_LIST bugfix.
This commit is contained in:
parent
bc4ea680ce
commit
02ad2737fd
1 changed files with 7 additions and 4 deletions
|
@ -18,17 +18,20 @@ password_find(list *l)
|
||||||
{
|
{
|
||||||
struct password_item *pi;
|
struct password_item *pi;
|
||||||
|
|
||||||
|
if (l)
|
||||||
|
{
|
||||||
WALK_LIST(pi, *l)
|
WALK_LIST(pi, *l)
|
||||||
{
|
{
|
||||||
if ((pi->genfrom > now) && (pi->gento < now))
|
if ((pi->genfrom > now) && (pi->gento < now))
|
||||||
return pi;
|
return pi;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void password_cpy(char *dst, char *src, int size)
|
void password_cpy(char *dst, char *src, int size)
|
||||||
{
|
{
|
||||||
bzero(dst, size);
|
bzero(dst, size);
|
||||||
memcpy(dst, src, strlen(src) < size ? strlen(src) : size);
|
memcpy(dst, src, strlen(src) < (unsigned) size ? strlen(src) : (unsigned) size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue