X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fstring.c;h=a954396512723624ff777e457789e84f9dfd1641;hb=49132a3bb5c65364b1d9cc5b405bd0ef046e7828;hp=8cc34a0773cbb70cad5ff5b388be03c62e6a9636;hpb=f3ebb786e451da973560f1c9d8cdb151d25108b5;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/string.c b/src/src/string.c index 8cc34a077..a95439651 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -223,6 +223,8 @@ interpreted in strings. Arguments: pp points a pointer to the initiating "\" in the string; the pointer gets updated to point to the final character + If the backslash is the last character in the string, it + is not interpreted. Returns: the value of the character escape */ @@ -235,6 +237,7 @@ const uschar *hex_digits= CUS"0123456789abcdef"; int ch; const uschar *p = *pp; ch = *(++p); +if (ch == '\0') return **pp; if (isdigit(ch) && ch != '8' && ch != '9') { ch -= '0'; @@ -1138,8 +1141,8 @@ memcpy(g->s + p, s, count); g->ptr = p + count; return g; } - - + + gstring * string_cat(gstring *string, const uschar *s) { @@ -1277,8 +1280,10 @@ else if (!(flags & SVFMT_TAINT_NOCHK)) dest_tainted = is_tainted(g->s); if (!(flags & SVFMT_TAINT_NOCHK) && !dest_tainted && is_tainted(format)) { +#ifndef MACRO_PREDEF if (!(flags & SVFMT_REBUFFER)) die_tainted(US"string_vformat", func, line); +#endif gstring_rebuffer(g); dest_tainted = TRUE; } @@ -1507,8 +1512,10 @@ while (*fp) gp = CS g->s + g->ptr; dest_tainted = TRUE; } +#ifndef MACRO_PREDEF else die_tainted(US"string_vformat", func, line); +#endif INSERT_STRING: /* Come to from %D or %M above */