From: Arran Cudbard-Bell Date: Mon, 15 May 2017 22:35:27 +0000 (-0400) Subject: Allocate space for \0 byte X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4d4af753d5b5d0806d2c213ff10f3cfd182a15e;p=thirdparty%2Ffreeradius-server.git Allocate space for \0 byte --- diff --git a/src/lib/util/value.c b/src/lib/util/value.c index 5dc8e58959c..362a112b36b 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -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);