diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2019-07-25 20:09:18 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2019-07-25 20:09:18 +0100 |
commit | aaabfafe3fb76b1e09a68317ef4b3d5bc94fa9be (patch) | |
tree | 651faf3d84749f22f9cd6b1e3b7382b502fffca8 /src | |
parent | f8d78f744328266ad9f7f48cf5ca8f7d67c227c4 (diff) |
Build: workaround inlining problems on Solaris
Diffstat (limited to 'src')
-rw-r--r-- | src/src/mytypes.h | 4 | ||||
-rw-r--r-- | src/src/store.c | 2 | ||||
-rw-r--r-- | src/src/string.c | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/src/mytypes.h b/src/src/mytypes.h index aaa6e9052..de2371c7d 100644 --- a/src/src/mytypes.h +++ b/src/src/mytypes.h @@ -134,8 +134,12 @@ By extension, a variable pointing to this address is tainted. static inline BOOL is_tainted(const void * p) { +#ifdef MACRO_PREDEF +return FALSE; +#else extern void * tainted_base, * tainted_top; return p >= tainted_base && p < tainted_top; +#endif } static inline uschar * __Ustrcat(uschar * dst, const uschar * src, const char * func, int line) diff --git a/src/src/store.c b/src/src/store.c index 41ca43d65..b7cf4cdee 100644 --- a/src/src/store.c +++ b/src/src/store.c @@ -710,8 +710,10 @@ int pool = tainted ? store_pool + POOL_TAINT_BASE : store_pool; BOOL release_ok = !tainted && store_last_get[pool] == block; uschar * newtext; +#ifndef MACRO_PREDEF if (is_tainted(block) != tainted) die_tainted(US"store_newblock", CUS func, linenumber); +#endif newtext = store_get(newsize, tainted); memcpy(newtext, block, len); diff --git a/src/src/string.c b/src/src/string.c index 8cc34a077..288466113 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -1277,8 +1277,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 +1509,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 */ |