git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
429133f
)
Second part of fix for bug #7781 - Samba transforms ShareName to lowercase (sharename...
author
Jeremy Allison
<jra@samba.org>
Thu, 1 Nov 2012 18:56:22 +0000
(11:56 -0700)
committer
Karolin Seeger
<kseeger@samba.org>
Fri, 14 Dec 2012 09:01:36 +0000
(10:01 +0100)
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
)
source3/lib/util_str.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_str.c
b/source3/lib/util_str.c
index 17a4a8f2c4e9727f56a0c559d70de14ac4c14c57..c98bebe21c129144bad7825ed7ecfcc60a189780 100644
(file)
--- 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