Fix off-by-one bug: we forgot to account for the terminating NUL when
checking the length of the label. git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@881 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
310b5ee125
commit
9ff1a454ce
1 changed files with 2 additions and 2 deletions
|
@ -55,9 +55,9 @@ oath_key_create(const char *label,
|
|||
struct oath_key *key;
|
||||
int labellen;
|
||||
|
||||
/* check label */
|
||||
/* check label length */
|
||||
if (label == NULL ||
|
||||
(labellen = strlen(label)) > OATH_MAX_LABELLEN)
|
||||
(labellen = strlen(label)) >= OATH_MAX_LABELLEN)
|
||||
return (NULL);
|
||||
|
||||
/* check key length */
|
||||
|
|
Loading…
Reference in a new issue