From 37eb0d6c74ce158b1cc268cea446b33789550048 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 23 Jun 2001 07:22:16 +0000 Subject: Added other_safe_chars to alpha_strcpy(). Needs testing but is a better fix for the problem. Jeremy. (This used to be commit e059fffd03a1382fb2b7059b6de369d9fc765a17) --- source3/smbd/message.c | 4 ++-- source3/smbd/reply.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/message.c b/source3/smbd/message.c index a023650c74..bae9f6c906 100644 --- a/source3/smbd/message.c +++ b/source3/smbd/message.c @@ -86,8 +86,8 @@ static void msg_deliver(void) pstring s; pstrcpy(s,lp_msg_command()); - pstring_sub(s,"%f",alpha_strcpy(alpha_msgfrom,msgfrom,sizeof(alpha_msgfrom))); - pstring_sub(s,"%t",alpha_strcpy(alpha_msgto,msgto,sizeof(alpha_msgto))); + pstring_sub(s,"%f",alpha_strcpy(alpha_msgfrom,msgfrom,NULL,sizeof(alpha_msgfrom))); + pstring_sub(s,"%t",alpha_strcpy(alpha_msgto,msgto,NULL,sizeof(alpha_msgto))); standard_sub_basic(s); pstring_sub(s,"%s",name); smbrun(s,NULL); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 0c40e5f2b3..da4659dfa1 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -96,7 +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); + alpha_strcpy(remote_machine,remote_machine,SAFE_NETBIOS_CHARS,sizeof(remote_machine)-1); fstrcpy(local_machine,name1); len = strlen(local_machine); @@ -106,7 +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); + alpha_strcpy(local_machine,local_machine,SAFE_NETBIOS_CHARS,sizeof(local_machine)-1); if (name_type == 'R') { /* We are being asked for a pathworks session --- -- cgit