git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8a90b4
)
s3-rpc_server: Fixed possible segfault with client_id.
author
Andreas Schneider
<asn@samba.org>
Wed, 9 Feb 2011 13:08:34 +0000
(14:08 +0100)
committer
Andreas Schneider
<asn@cryptomilk.org>
Wed, 9 Feb 2011 15:42:19 +0000
(16:42 +0100)
source3/rpc_server/rpc_server.c
patch
|
blob
|
history
diff --git
a/source3/rpc_server/rpc_server.c
b/source3/rpc_server/rpc_server.c
index 5be0e5e07de21fc7a1a7f9f802a20fe81d3fa06b..9a7ff099da323b3e8ba91de5e0d48903881b7c02 100644
(file)
--- a/
source3/rpc_server/rpc_server.c
+++ b/
source3/rpc_server/rpc_server.c
@@
-98,6
+98,12
@@
static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
}
strlcpy(p->client_id->addr,
client_address, sizeof(p->client_id->addr));
+ p->client_id->name = talloc_strdup(p->client_id, client_address);
+ if (p->client_id->name == NULL) {
+ TALLOC_FREE(p);
+ *perrno = ENOMEM;
+ return -1;
+ }
talloc_set_destructor(p, close_internal_rpc_pipe_hnd);