From: Arran Cudbard-Bell Date: Tue, 16 Jan 2018 00:00:40 +0000 (-0700) Subject: Fix buffer scoping in fr_pair_make X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6589deeb32a105b99379fd4ecbb90c0e5d848df0;p=thirdparty%2Ffreeradius-server.git Fix buffer scoping in fr_pair_make --- diff --git a/src/lib/util/pair.c b/src/lib/util/pair.c index 689df2a0575..2a068500600 100644 --- a/src/lib/util/pair.c +++ b/src/lib/util/pair.c @@ -369,6 +369,7 @@ VALUE_PAIR *fr_pair_make(TALLOC_CTX *ctx, VALUE_PAIR **vps, char *p; int8_t tag; char const *attrname = attribute; + char buffer[FR_DICT_ATTR_MAX_NAME_LEN + 1 + 32]; /* * Check for tags in 'Attribute:Tag' format. @@ -378,7 +379,6 @@ VALUE_PAIR *fr_pair_make(TALLOC_CTX *ctx, VALUE_PAIR **vps, p = strchr(attribute, ':'); if (p) { char *end; - char buffer[FR_DICT_ATTR_MAX_NAME_LEN + 1 + 32]; if (!p[1]) { fr_strerror_printf("Invalid tag for attribute %s", attribute);