summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-09-21 16:35:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:39 -0500
commite0febb258a29ac5deb034075219114337f468001 (patch)
treee01977fe24ef9076cdada985f2f7d8b1a508f84d /source4/libcli
parent90678b76d64fd478a0cb7d81e7242ac6806fe754 (diff)
downloadsamba-e0febb258a29ac5deb034075219114337f468001.tar.gz
samba-e0febb258a29ac5deb034075219114337f468001.tar.bz2
samba-e0febb258a29ac5deb034075219114337f468001.zip
r10395: While playing with winbind, I found a segfault because I had given
resolve_name_send a stack-allocated method list. Duplicate it. Volker (This used to be commit 17dbbf965bcf038be7450781e28acb5e061eb295)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/resolve/resolve.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index d62890434b..c21b29b57f 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -133,7 +133,8 @@ struct composite_context *resolve_name_send(struct nbt_name *name, struct event_
if (!NT_STATUS_IS_OK(status)) goto failed;
if (methods == NULL) goto failed;
- state->methods = methods;
+ state->methods = str_list_copy(state, methods);
+ if (state->methods == NULL) goto failed;
c->state = SMBCLI_REQUEST_SEND;
c->private = state;