The Samba-Bugzilla – Attachment 7259 Details for
Bug 8724
Memory leak in parent smbd on connection; CVE-2012-0817
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix for 3.6.x
fix1 (text/plain), 1.70 KB, created by
Jeremy Allison
on 2012-01-26 22:42:05 UTC
(
hide
)
Description:
Fix for 3.6.x
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2012-01-26 22:42:05 UTC
Size:
1.70 KB
patch
obsolete
>diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c >index e72a8c3..68328e5 100644 >--- a/source3/lib/substitute.c >+++ b/source3/lib/substitute.c >@@ -195,7 +195,7 @@ void sub_set_smb_name(const char *name) > } > > static char sub_peeraddr[INET6_ADDRSTRLEN]; >-static const char *sub_peername = ""; >+static const char *sub_peername = NULL; > static char sub_sockaddr[INET6_ADDRSTRLEN]; > > void sub_set_socket_ids(const char *peeraddr, const char *peername, >@@ -208,6 +208,11 @@ void sub_set_socket_ids(const char *peeraddr, const char *peername, > } > strlcpy(sub_peeraddr, addr, sizeof(sub_peeraddr)); > >+ if (sub_peername != NULL && >+ sub_peername != sub_peeraddr) { >+ free(discard_const_p(char,sub_peername)); >+ sub_peername = NULL; >+ } > sub_peername = SMB_STRDUP(peername); > if (sub_peername == NULL) { > sub_peername = sub_peeraddr; >@@ -646,7 +651,7 @@ static char *alloc_sub_basic(const char *smb_name, const char *domain_name, > break; > case 'M' : > a_string = realloc_string_sub(a_string, "%M", >- sub_peername); >+ sub_peername ? sub_peername : ""); > break; > case 'R' : > a_string = realloc_string_sub(a_string, "%R", remote_proto); >diff --git a/source3/smbd/server.c b/source3/smbd/server.c >index 8ac0511..db68ace 100644 >--- a/source3/smbd/server.c >+++ b/source3/smbd/server.c >@@ -64,6 +64,12 @@ static void smbd_set_server_fd(int fd) > * name, default to its address. > */ > >+ if (sconn->client_id.name != NULL && >+ sconn->client_id.name != sconn->client_id.addr) { >+ talloc_free(discard_const_p(char, sconn->client_id.name)); >+ sconn->client_id.name = NULL; >+ } >+ > client_addr(fd, sconn->client_id.addr, sizeof(sconn->client_id.addr)); > > name = client_name(sconn->sock);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 8724
: 7259