summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util_str.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 17a4a8f2c4e..c98bebe21c1 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -514,6 +514,10 @@ char *safe_strcpy_fn(const char *fn,
return NULL;
}
+ if (src == dest) {
+ return dest;
+ }
+
#ifdef DEVELOPER
clobber_region(fn,line,dest, maxlength+1);
#endif