summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-10 17:24:44 -0700
committerJeremy Allison <jra@samba.org>2007-10-10 17:24:44 -0700
commit39d30c54995b93c095dd8e367cff756c8a4b6e7f (patch)
treebad4c7d4defc9669aeaa6e75bec38896b9c11a40 /source3/smbd
parente5a951325a6cac8567af3a66de6d2df577508ae4 (diff)
downloadsamba-39d30c54995b93c095dd8e367cff756c8a4b6e7f.tar.gz
samba-39d30c54995b93c095dd8e367cff756c8a4b6e7f.tar.bz2
samba-39d30c54995b93c095dd8e367cff756c8a4b6e7f.zip
Fix valgrind-found memory overwrite.
(This used to be commit 183df4754b5f18419f4d8fca2c0fa19919174556)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 7392271b48..ce038e719a 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1469,7 +1469,7 @@ static BOOL get_lanman2_dir_entry(TALLOC_CTX *ctx,
p += fill_ea_buffer(ctx, p, space_remaining, conn, name_list);
nameptr = p;
len = srvstr_push(base_data, flags2,
- p + 1, fname, PTR_DIFF(end_data, p),
+ p + 1, fname, PTR_DIFF(end_data, p+1),
STR_TERMINATE | STR_NOALIGN);
if (flags2 & FLAGS2_UNICODE_STRINGS) {
if (len > 2) {
@@ -1554,7 +1554,7 @@ static BOOL get_lanman2_dir_entry(TALLOC_CTX *ctx,
SOFF_T(p,0,allocation_size); p += 8;
SIVAL(p,0,nt_extmode); p += 4;
len = srvstr_push(base_data, flags2,
- p + 4, fname, PTR_DIFF(end_data, p),
+ p + 4, fname, PTR_DIFF(end_data, p+4),
STR_TERMINATE_ASCII);
SIVAL(p,0,len);
p += 4 + len;