diff options
author | Jeremy Allison <jra@samba.org> | 2012-11-01 11:56:22 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2012-11-05 11:10:14 +0100 |
commit | e81b3c9a2aa58cbf5e12ef129fa63aab784c9598 (patch) | |
tree | d32d7179b068bb8b765268c5fae1a6d7dbe11d05 | |
parent | 3b1528dcd67d62f20313094be9b5d609a1ca4f25 (diff) | |
download | samba-e81b3c9a2aa58cbf5e12ef129fa63aab784c9598.tar.gz |
Second part of fix for bug #7781 - Samba transforms ShareName to lowercase (sharename) when adding new share via MMC
Ensure safe_strcpy is safe when src == dest. This probably needs porting
to master/3.6.x/4.0.x.
-rw-r--r-- | source3/lib/util_str.c | 4 |
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 |