From f4e79d7588f1c6d5839422a8ee63b0ea794c9908 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Fri, 26 Jan 2024 13:51:56 -0600 Subject: [PATCH] Use the same encoding for binary data as strings Closes #5285 --- src/lib/print.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/print.c b/src/lib/print.c index 57455b6f30bf1..83aa26744bc52 100644 --- a/src/lib/print.c +++ b/src/lib/print.c @@ -529,6 +529,7 @@ size_t vp_prints_value_json(char *out, size_t outlen, VALUE_PAIR const *vp, bool switch (vp->da->type) { case PW_TYPE_STRING: + case PW_TYPE_OCTETS: for (q = vp->vp_strvalue; q < vp->vp_strvalue + vp->vp_length; q++) { /* Indicate truncation */ if (freespace < 3) return outlen + 1;