X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=sink.c;h=5e9bef9864eb80f6ae3bac880a33b582be8a1e55;hb=33cddbff323efcbae1503e91e6e65b2733da80c7;hp=6c9b101f74ceb1213ff5759565279dfcbfa80738;hpb=ecfb21f7457a5137b4664c139ecd69cd36c375f5;p=~andy%2Ffetchmail diff --git a/sink.c b/sink.c index 6c9b101f..5e9bef98 100644 --- a/sink.c +++ b/sink.c @@ -1150,6 +1150,16 @@ static int open_mda_sink(struct query *ctl, struct msgblk *msg, for (dp = after, sp = before; (*dp = *sp); dp++, sp++) { if (sp[0] != '%') continue; + if (sp > before && sp[-1] == '\'') { + report(stderr, GT_("MDA option contains single-quoted %%%c expansion.\n"), sp[1]); + report(stderr, GT_("Refusing to deliver. Check the manual and fix your mda option.\n")); + free(before); + free(after); + if (from) free(from); + if (names) free(names); + return PS_SYNTAX; + } + /* need to expand? BTW, no here overflow, because in ** the worst case (end of string) sp[1] == '\0' */ if (sp[1] == 's' || sp[1] == 'T') {