Report space required for the whole %{pairs:} string.
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 Sep 2014 01:11:11 +0000 (21:11 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 Sep 2014 01:11:11 +0000 (21:11 -0400)
src/modules/rlm_expr/rlm_expr.c

index ebc172a..0c89baf 100644 (file)
@@ -923,7 +923,7 @@ static ssize_t pairs_xlat(UNUSED void *instance, UNUSED REQUEST *request,
                if (is_truncated(len, freespace)) {
                no_space:
                        REDEBUG("Insufficient space to store pair string, needed %zu bytes have %zu bytes",
-                               len, freespace);
+                               (p - out) + len, outlen);
                        *out = '\0';
                        return -1;
                }