Reserve room in the label buffer for the terminating NUL.

This commit is contained in:
Dag-Erling Smørgrav 2016-02-19 12:20:25 +01:00
parent 3fbaf4e647
commit 1d0f2a4ff3

View file

@ -52,7 +52,7 @@ oath_key_create(const char *label,
/* check label */
if (label == NULL ||
(labellen = strlen(label)) > OATH_MAX_LABELLEN)
(labellen = strlen(label)) >= OATH_MAX_LABELLEN)
return (NULL);
/* check key length */