summaryrefslogtreecommitdiff
path: root/source3/smbd/srvstr.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-03-22 15:30:43 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-03-23 12:49:39 +1100
commit1923b78209aaa2aa926dedd19e6c97fb449c48c8 (patch)
tree534acb7efe0910616511dd645b86a4b7cd5422a7 /source3/smbd/srvstr.c
parentcd4306b01e4097b76777a9a85cc226e8b0e8f613 (diff)
downloadsamba-1923b78209aaa2aa926dedd19e6c97fb449c48c8.tar.gz
samba-1923b78209aaa2aa926dedd19e6c97fb449c48c8.tar.bz2
samba-1923b78209aaa2aa926dedd19e6c97fb449c48c8.zip
s3-lib Remove the clobber_region() code.
This code wrote to the full buffer in fstrcpy(), pstrcpy() and other fixed-length string manipulation functions. The hope of this code was to find out at run time if we were mixing up pstring and fstring etc, and to record where this came from. It has a runtime performance impact (particularly if compiled with --enable-developer). It is being removed because of the complexity it adds, and the distinct lack of bugs that this complexity has been credited in finding. The macro-based compile-time checking of string sizes remains. Andrew Bartlett
Diffstat (limited to 'source3/smbd/srvstr.c')
-rw-r--r--source3/smbd/srvstr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/srvstr.c b/source3/smbd/srvstr.c
index d3f341138c..4fd533fcaf 100644
--- a/source3/smbd/srvstr.c
+++ b/source3/smbd/srvstr.c
@@ -23,8 +23,7 @@
/* Make sure we can't write a string past the end of the buffer */
-size_t srvstr_push_fn(const char *function, unsigned int line,
- const char *base_ptr, uint16 smb_flags2, void *dest,
+size_t srvstr_push_fn(const char *base_ptr, uint16 smb_flags2, void *dest,
const char *src, int dest_len, int flags)
{
if (dest_len < 0) {
@@ -32,7 +31,7 @@ size_t srvstr_push_fn(const char *function, unsigned int line,
}
/* 'normal' push into size-specified buffer */
- return push_string_base(function, line, base_ptr, smb_flags2, dest, src,
+ return push_string_base(base_ptr, smb_flags2, dest, src,
dest_len, flags);
}