summaryrefslogtreecommitdiffstats
path: root/source/nsswitch
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-02-05 15:16:30 +0000
committerGerald Carter <jerry@samba.org>2007-02-05 15:16:30 +0000
commita7b07e5e7217f8580030c263530ecf4fdab70e32 (patch)
treeaf0b4f3939d68a3f9e3a27672f25882f013e8b17 /source/nsswitch
parent66b92aba334e89e5e0e886e514d3f556d60bc07c (diff)
downloadsamba-a7b07e5e7217f8580030c263530ecf4fdab70e32.tar.gz
samba-a7b07e5e7217f8580030c263530ecf4fdab70e32.tar.xz
samba-a7b07e5e7217f8580030c263530ecf4fdab70e32.zip
r21151: applying patches for CVE-2007-045[34]
Diffstat (limited to 'source/nsswitch')
-rw-r--r--source/nsswitch/winbind_nss_solaris.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/nsswitch/winbind_nss_solaris.c b/source/nsswitch/winbind_nss_solaris.c
index 04f464a7983..3b069d339f2 100644
--- a/source/nsswitch/winbind_nss_solaris.c
+++ b/source/nsswitch/winbind_nss_solaris.c
@@ -493,7 +493,8 @@ _nss_winbind_ipnodes_getbyname(nss_backend_t* be, void *args)
af = AF_INET6;
#endif
- strncpy(request.data.winsreq, argp->key.name, strlen(argp->key.name)) ;
+ strncpy(request.data.winsreq, argp->key.name, sizeof(request.data.winsreq) - 1);
+ request.data.winsreq[sizeof(request.data.winsreq) - 1] = '\0';
if( (ret = winbindd_request_response(WINBINDD_WINS_BYNAME, &request, &response))
== NSS_STATUS_SUCCESS ) {
@@ -515,7 +516,8 @@ _nss_winbind_hosts_getbyname(nss_backend_t* be, void *args)
ZERO_STRUCT(response);
ZERO_STRUCT(request);
- strncpy(request.data.winsreq, argp->key.name, strlen(argp->key.name));
+ strncpy(request.data.winsreq, argp->key.name, sizeof(request.data.winsreq) - 1);
+ request.data.winsreq[sizeof(request.data.winsreq) - 1] = '\0';
if( (ret = winbindd_request_response(WINBINDD_WINS_BYNAME, &request, &response))
== NSS_STATUS_SUCCESS ) {