git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9265628
)
Make this safe for -DDEVELOPER checks.
author
Andrew Bartlett
<abartlet@samba.org>
Wed, 23 Apr 2003 10:06:00 +0000
(10:06 +0000)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 23 Apr 2003 10:06:00 +0000
(10:06 +0000)
Andrew Bartlett
(This used to be commit
39fb77d8c1d9dddf00e8063198157bf77fb58a8f
)
source3/smbwrapper/shared.c
patch
|
blob
|
history
diff --git
a/source3/smbwrapper/shared.c
b/source3/smbwrapper/shared.c
index b4cfcf71486a3ead71dea398a73d10839378c34b..ca8df5841d1e3b9a18e7e8792277aa0e66a4abf4 100644
(file)
--- a/
source3/smbwrapper/shared.c
+++ b/
source3/smbwrapper/shared.c
@@
-179,8
+179,8
@@
void smbw_setshared(const char *name, const char *val)
SSVAL(&variables[shared_size], 0, l1);
SSVAL(&variables[shared_size], 2, l2);
-
pstrcpy(&variables[shared_size] + 4, name
);
-
pstrcpy(&variables[shared_size] + 4 + l1, val
);
+
safe_strcpy(&variables[shared_size] + 4, name, l1-1
);
+
safe_strcpy(&variables[shared_size] + 4 + l1, val, l2-1
);
shared_size += l1+l2+4;