diff options
author | Jeremy Allison <jra@samba.org> | 2012-11-01 11:56:22 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2012-12-14 10:01:36 +0100 |
commit | 18d9c35ec1afe7c819578e6fb2dffa6a46ba062d (patch) | |
tree | e2f0c82e76f24c06c94dbff02dacc7f57faaeeee | |
parent | 429133f5ad716019995f2ae6407ce563e1b6872b (diff) | |
download | samba-18d9c35ec1afe7c819578e6fb2dffa6a46ba062d.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.
(cherry picked from commit e81b3c9a2aa58cbf5e12ef129fa63aab784c9598)
-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 |