Skip to content

Commit

Permalink
Fix SEGV when parsing 64bit integer fails
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Oct 30, 2014
1 parent d05537c commit b74c7b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/value.c
Expand Up @@ -795,8 +795,7 @@ ssize_t value_data_from_str(TALLOC_CTX *ctx, value_data_t *out,
* Note that ALL integers are unsigned!
*/
if (sscanf(value, "%" PRIu64, &i) != 1) {
fr_strerror_printf("Invalid value '%s' for attribute '%s'",
value, enumv->name);
fr_strerror_printf("Failed parsing \"%s\" as unsigned 64bit integer", value);
return -1;
}
out->integer64 = i;
Expand Down

0 comments on commit b74c7b1

Please sign in to comment.