summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>1998-06-16 06:52:24 +0000
committerRichard Sharpe <sharpe@samba.org>1998-06-16 06:52:24 +0000
commit5bf9b18328e61af808f5cbd6aa22513102096675 (patch)
tree2051eb003e08bcf3dda9d0402bb8232ddadac5ac
parentcb757820f5452d192ce3b1eeb4f19a17ee93c3fe (diff)
downloadsamba-5bf9b18328e61af808f5cbd6aa22513102096675.tar.gz
samba-5bf9b18328e61af808f5cbd6aa22513102096675.tar.bz2
samba-5bf9b18328e61af808f5cbd6aa22513102096675.zip
CLITAR changes to overcome some reported problems and add Jay's changes
(This used to be commit e1468dac0333eacea0a6f85f968e0a6d85af7f4c)
-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.
********************************************************************/