[exim-cvs] Arg type coercion for Ustpcpy

Pàgina inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
A: exim-cvs
Assumpte: [exim-cvs] Arg type coercion for Ustpcpy
Gitweb: https://git.exim.org/exim.git/commitdiff/e2730b852a7ea9504008fa85878f5304dfdbd06e
Commit:     e2730b852a7ea9504008fa85878f5304dfdbd06e
Parent:     8b8667503b5248524dbe94fa11be312fca5b380c
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Tue Dec 3 19:23:13 2024 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Tue Dec 3 19:23:13 2024 +0000


    Arg type coercion for Ustpcpy
---
 src/src/functions.h | 3 ++-
 src/src/mytypes.h   | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)


diff --git a/src/src/functions.h b/src/src/functions.h
index 2b77babec..74000b92f 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -743,8 +743,9 @@ if (!is_tainted(dst) && is_tainted(src)) die_tainted(US"Ustrncpy", CUS func, lin
 return US strncpy(CS dst, CCS src, n);
 }
 #if !defined(COMPILE_UTILITY) && !defined(MACRO_PREDEF)
-static inline uschar * Ustpcpy(uschar * dst, const uschar * src)
+static inline uschar * __Ustpcpy(uschar * dst, const uschar * src, const char * func, int line)
 {
+if (!is_tainted(dst) && is_tainted(src)) die_tainted(US"Ustpcpy", CUS func, line);
 return US stpcpy(CS dst, CCS src);
 }
 #endif
diff --git a/src/src/mytypes.h b/src/src/mytypes.h
index 598569d00..d381f724b 100644
--- a/src/src/mytypes.h
+++ b/src/src/mytypes.h
@@ -147,6 +147,7 @@ functions that are called quite often; for other calls to external libraries
 # define Ustrcpy(s,t)       __Ustrcpy(s, CUS(t), __FUNCTION__, __LINE__)
 # define Ustrncat(s,t,n)    __Ustrncat(s, CUS(t), n, __FUNCTION__, __LINE__)
 # define Ustrncpy(s,t,n)    __Ustrncpy(s, CUS(t), n, __FUNCTION__, __LINE__)
+# define Ustpcpy(s,t)       __Ustpcpy(s, CUS(t), __FUNCTION__, __LINE__)
 #endif


#endif

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/