From 7133aed083612480a94a7b61d6a0a0308c304b6e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 23 Jun 2001 00:22:14 +0000 Subject: Better fix for client name vulnarability. Jeremy. (This used to be commit 17c3faa367328d186d10f59f08549de0c608b16a) --- source3/smbd/reply.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index cd7b3fe6fe..0c40e5f2b3 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -96,6 +96,7 @@ int reply_special(char *inbuf,char *outbuf) remote_machine[15] = 0; trim_string(remote_machine," "," "); strlower(remote_machine); + alpha_strcpy(remote_machine,remote_machine,sizeof(remote_machine)-1); fstrcpy(local_machine,name1); len = strlen(local_machine); @@ -105,6 +106,7 @@ int reply_special(char *inbuf,char *outbuf) } trim_string(local_machine," "," "); strlower(local_machine); + alpha_strcpy(local_machine,local_machine,sizeof(local_machine)-1); if (name_type == 'R') { /* We are being asked for a pathworks session --- -- cgit