* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2015 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
#include "../exim.h"
const uschar * list = rblock->remove_headers;
int sep = ':';
uschar * s;
+ gstring * g = NULL;
+
+ if (*remove_headers)
+ g = string_cat(NULL, *remove_headers);
while ((s = string_nextinlist(&list, &sep, NULL, 0)))
if (!(s = expand_string(s)))
}
}
else if (*s)
- *remove_headers = string_append_listele(*remove_headers, ':', s);
+ g = string_append_listele(g, ':', s);
+ if (g)
+ *remove_headers = g->s;
}
return OK;
}
-/* vi: aw ai sw=4
+/* vi: aw ai sw=2
*/
/* End of rf_get_munge_headers.c */