Changeset 881 in openpam for trunk/lib


Ignore:
Timestamp:
Jan 9, 2016, 6:29:32 PM (5 years ago)
Author:
Dag-Erling Smørgrav
Message:

Fix off-by-one bug: we forgot to account for the terminating NUL when
checking the length of the label.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/liboath/oath_key_create.c

    r799 r881  
    5656        int labellen;
    5757
    58         /* check label */
     58        /* check label length */
    5959        if (label == NULL ||
    60             (labellen = strlen(label)) > OATH_MAX_LABELLEN)
     60            (labellen = strlen(label)) >= OATH_MAX_LABELLEN)
    6161                return (NULL);
    6262
Note: See TracChangeset for help on using the changeset viewer.