summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-03-28 16:49:30 -0700
committerJeremy Allison <jra@samba.org>2012-03-29 20:48:15 +0200
commit5df1c115391f2d673d3dd2dfb89146ce77639d41 (patch)
tree6476e3ef1ad04b57f230f4f4167e04e020bce111 /source3
parent762928945d8c18abbce1447fb0e731a4515ffb4c (diff)
downloadsamba-5df1c115391f2d673d3dd2dfb89146ce77639d41.tar.gz
samba-5df1c115391f2d673d3dd2dfb89146ce77639d41.tar.bz2
samba-5df1c115391f2d673d3dd2dfb89146ce77639d41.zip
Start to add truncate checks on all uses of strlcpy(). Reading lwn
has it's uses :-). Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Mar 29 20:48:15 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c4
1 files changed, 3 insertions, 1 deletions
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;