summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-10-20 11:12:11 +0200
committerJeremy Allison <jra@samba.org>2007-11-01 13:59:35 -0700
commit0e073b8152103d9de9fc68cb5b0dfbb7c9b0327a (patch)
tree67c1861d91a46763ded4e7eefe67eb8e8c909d4b /source3/libsmb
parent456ca680f24f13e72a529e6e280b1fffa744a1ff (diff)
downloadsamba-0e073b8152103d9de9fc68cb5b0dfbb7c9b0327a.tar.gz
samba-0e073b8152103d9de9fc68cb5b0dfbb7c9b0327a.tar.bz2
samba-0e073b8152103d9de9fc68cb5b0dfbb7c9b0327a.zip
Fix for bug 5021
This is a different fix than the bug reporter (Evgeniy Dushistov <dushistov at mail.ru>, thanks!) created, but it lives without the boolean status variable. Untested so far, but I can not add attachments to bugs right now. But to me this looks really obvious. (This used to be commit b481abf5914dcafe5642c4d9394d02603e905bbb)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/libsmbclient.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 0b45cad3e1..ff434d275a 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -2671,7 +2671,11 @@ smbc_opendir_ctx(SMBCCTX *context,
return NULL;
}
- ip_list = &server_addr;
+ ip_list = memdup(&server_addr, sizeof(server_addr));
+ if (ip_list == NULL) {
+ errno = ENOMEM;
+ return NULL;
+ }
count = 1;
}