summaryrefslogtreecommitdiff
path: root/src/src/functions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/src/functions.h')
-rw-r--r--src/src/functions.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/src/functions.h b/src/src/functions.h
index df4b33606..851cedd3f 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -919,6 +919,18 @@ va_end(ap);
return g;
}
+
+/* Copy the content of a string to tainted memory */
+
+static inline void
+gstring_rebuffer(gstring * g)
+{
+uschar * s = store_get(g->size, TRUE);
+memcpy(s, g->s, g->ptr);
+g->s = s;
+}
+
+
/******************************************************************************/
#define store_get_dns_answer() store_get_dns_answer_trc(CUS __FUNCTION__, __LINE__)