summaryrefslogtreecommitdiff
path: root/source3/include/safe_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/safe_string.h')
-rw-r--r--source3/include/safe_string.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/include/safe_string.h b/source3/include/safe_string.h
index 26bf6cdd6f..431dc400aa 100644
--- a/source3/include/safe_string.h
+++ b/source3/include/safe_string.h
@@ -87,4 +87,13 @@ char * __unsafe_string_function_usage_here__(void);
#define strlower(s) strlower_m(s)
#define strupper(s) strupper_m(s)
+/* the addition of the DEVELOPER checks in safe_strcpy means we must
+ * update a lot of code. To make this a little easier here are some
+ * functions that provide the lengths with less pain */
+#define pstrcpy_base(dest, src, pstring_base) \
+ safe_strcpy(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1)
+
+#define push_pstring_base(dest, src, pstring_base) \
+ push_ascii(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1, STR_TERMINATE)
+
#endif