From 5df1c115391f2d673d3dd2dfb89146ce77639d41 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 28 Mar 2012 16:49:30 -0700 Subject: Start to add truncate checks on all uses of strlcpy(). Reading lwn has it's uses :-). Autobuild-User: Jeremy Allison Autobuild-Date: Thu Mar 29 20:48:15 CEST 2012 on sn-devel-104 --- source3/smbd/process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index ed19e7f42b..30dbc0c6dd 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -3037,7 +3037,9 @@ static NTSTATUS smbd_register_ips(struct smbd_server_connection *sconn, return NT_STATUS_NO_MEMORY; } - client_socket_addr(sconn->sock, tmp_addr, sizeof(tmp_addr)); + if (client_socket_addr(sconn->sock, tmp_addr, sizeof(tmp_addr)) == NULL) { + return NT_STATUS_NO_MEMORY; + } addr = talloc_strdup(cconn, tmp_addr); if (addr == NULL) { return NT_STATUS_NO_MEMORY; -- cgit