Skip to content

Commit

Permalink
Allocate space for \0 byte
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed May 15, 2017
1 parent cd596f2 commit b4d4af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/util/value.c
Expand Up @@ -2469,7 +2469,7 @@ int fr_value_box_from_str(TALLOC_CTX *ctx, fr_value_box_t *dst,
fr_dict_enum_t *enumv;

if (len > (sizeof(buffer) - 1)) {
tmp = talloc_array(NULL, char, len);
tmp = talloc_array(NULL, char, len + 1);
if (!tmp) return -1;

alias_len = value_str_unescape((uint8_t *)tmp, in, len, quote);
Expand Down

0 comments on commit b4d4af7

Please sign in to comment.