From: Alan T. DeKok Date: Tue, 25 Jan 2011 16:20:54 +0000 (+0100) Subject: Clarify parse error for ascend attributes X-Git-Tag: release_2_1_11~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fb8179ff9d5717285078a57baeb9e8bbfec9ea3;p=thirdparty%2Ffreeradius-server.git Clarify parse error for ascend attributes Printing to the same string we're reading from is a bad idea. --- diff --git a/src/lib/valuepair.c b/src/lib/valuepair.c index 6e63e7abfcc..bda19385eea 100644 --- a/src/lib/valuepair.c +++ b/src/lib/valuepair.c @@ -1069,8 +1069,10 @@ VALUE_PAIR *pairparsevalue(VALUE_PAIR *vp, const char *value) } if (ascend_parse_filter(vp) < 0 ) { - fr_strerror_printf("failed to parse Ascend binary attribute: %s", - fr_strerror()); + char buffer[256]; + + snprintf(buffer, sizeof(buffer), "failed to parse Ascend binary attribute: %s", fr_strerror()); + fr_strerror_printf("%s", buffer); return NULL; } break;