summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 750ca0f3ab..698edac512 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -5017,6 +5017,25 @@ int unistrcpy(char *dst, char *src)
}
/*******************************************************************
+Create a string of size size+1 (for the null)
+*******************************************************************/
+char *string_create_s(int size)
+{
+ char *tmp;
+
+ tmp = (char *)malloc(size+1);
+
+ if (tmp == NULL) {
+
+ DEBUG(0, ("Out of memory in string_create_s\n"));
+
+ }
+
+ return(tmp);
+
+}
+
+/*******************************************************************
safe string copy into a known length string. maxlength does not
include the terminating zero.
********************************************************************/