diff options
Diffstat (limited to 'src/printf.c')
-rw-r--r-- | src/printf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/printf.c b/src/printf.c index a8bf0fdb1..4155f9478 100644 --- a/src/printf.c +++ b/src/printf.c @@ -216,6 +216,7 @@ rspamd_vsnprintf (gchar *buf, glong max, const gchar *fmt, va_list args) guint64 ui64; guint width, sign, hex, max_width, frac_width, i; f_str_t *v; + GString *gs; if (max <= 0) { return buf; @@ -312,6 +313,15 @@ rspamd_vsnprintf (gchar *buf, glong max, const gchar *fmt, va_list args) continue; + case 'v': + gs = va_arg (args, GString *); + len = gs->len; + len = (buf + len < last) ? len : (size_t) (last - buf); + + buf = ((gchar *)memcpy (buf, gs->str, len)) + len; + fmt++; + break; + case 's': p = va_arg(args, gchar *); if (p == NULL) { |