]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Return the correct length for quoted values in fr_value_box_snprint
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 9 Oct 2019 21:54:43 +0000 (17:54 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 9 Oct 2019 21:56:39 +0000 (17:56 -0400)
src/lib/util/value.c

index 2b5502b777b016ab329efe85b1d694e6e38c92af..5d3f98d2668d63d2e90ebe05592153ba3ae27f2b 100644 (file)
@@ -5039,6 +5039,7 @@ size_t fr_value_box_snprint(char *out, size_t outlen, fr_value_box_t const *data
                        buf[0] = (char) quote;
                        buf[len] = (char) quote;
                        buf[len + 1] = '\0';
+                       len++;  /* Account for trailing quote */
                }
                a = buf;
                break;