summaryrefslogtreecommitdiffstats
path: root/examples/libsmbclient
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2005-12-14 04:00:58 +0000
committerDerrell Lipman <derrell@samba.org>2005-12-14 04:00:58 +0000
commit2fa58d4c218401afa894dd9ed8d93edd8710cd6a (patch)
treecc418c07846dede32cd3753c83ae86a607f11548 /examples/libsmbclient
parent5a6cef8dccef985c4e48d58919a17d92a3b61dd7 (diff)
downloadsamba-2fa58d4c218401afa894dd9ed8d93edd8710cd6a.tar.gz
samba-2fa58d4c218401afa894dd9ed8d93edd8710cd6a.tar.xz
samba-2fa58d4c218401afa894dd9ed8d93edd8710cd6a.zip
r12225: r11729@cabra: derrell | 2005-12-13 22:59:45 -0500
1. Fix a crash bug which should have reared its ugly head ages ago, but for some reason, remained dormant until recently. The bug pertained to libsmbclient doing a structure assignment of a cli after having opened a pipe. The pipe open code makes a copy of the cli pointer that was passed to it. If the cli is later copied (and that cli pointer that was saved is no longer valid), the pipe code will cause a crash during shutdown or when the copied cli is closed. 2. The 'type' field in enumerated shares was not being set correctly with the new RPC-based mechanism for enumerating shares.
Diffstat (limited to 'examples/libsmbclient')
-rw-r--r--examples/libsmbclient/testbrowse2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/libsmbclient/testbrowse2.c b/examples/libsmbclient/testbrowse2.c
index a3d2cf3b8e2..76d98b9602a 100644
--- a/examples/libsmbclient/testbrowse2.c
+++ b/examples/libsmbclient/testbrowse2.c
@@ -85,7 +85,7 @@ void smbc_auth_fn(
strncpy(wrkgrp, workgroup, wrkgrplen - 1); wrkgrp[wrkgrplen - 1] = 0;
strncpy(user, username, userlen - 1); user[userlen - 1] = 0;
- strncpy(passwd, password, passwdlen - 1); passwd[passwdlen - 1] = 0;
+ strncpy(passwd, password, passwdlen - 1); passwd[passwdlen - 1] = 0;
}
SMBCCTX* create_smbctx(){