If the username we are trying to look up in the db files won't fit into
the buffer then act like it doesn't exist. The buffer is always big enough for any valid username. PR: 27860 Reviewed by: nectar
This commit is contained in:
parent
478e7bb603
commit
75328eca8d
@ -386,7 +386,9 @@ _local_getpw(rv, cb_data, ap)
|
||||
case _PW_KEYBYNAME:
|
||||
name = va_arg(ap, const char *);
|
||||
len = strlen(name);
|
||||
memmove(bf + 1, name, (size_t)MIN(len, MAXLOGNAME));
|
||||
if (len > sizeof(bf) - 1)
|
||||
return NS_NOTFOUND;
|
||||
memmove(bf + 1, name, len);
|
||||
key.size = len + 1;
|
||||
break;
|
||||
case _PW_KEYBYUID:
|
||||
|
Loading…
Reference in New Issue
Block a user