The branch, v3-2-test has been updated
       via  b3ed3f7e4e40c4f78d4c347411c75de81979455f (commit)
      from  e40c372e0ddf631dd9162c1fdfaaa49c29915f23 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit b3ed3f7e4e40c4f78d4c347411c75de81979455f
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Thu Nov 15 13:18:42 2007 -0800

    alpha_strcpy includes the space for the terminating nul.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/lib/substitute.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index ce88a78..db79a9f 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -72,8 +72,9 @@ bool set_local_machine_name(const char *local_name, bool perm)
                SAFE_FREE(tmp_local_machine);
                return false;
        }
+       /* alpha_strcpy includes the space for the terminating nul. */
        alpha_strcpy(local_machine,tmp_local_machine,
-                       SAFE_NETBIOS_CHARS,len);
+                       SAFE_NETBIOS_CHARS,len+1);
        strlower_m(local_machine);
        SAFE_FREE(tmp_local_machine);
 
@@ -123,8 +124,9 @@ bool set_remote_machine_name(const char *remote_name, bool 
perm)
                return false;
        }
 
+       /* alpha_strcpy includes the space for the terminating nul. */
        alpha_strcpy(remote_machine,tmp_remote_machine,
-                       SAFE_NETBIOS_CHARS,len);
+                       SAFE_NETBIOS_CHARS,len+1);
        strlower_m(remote_machine);
        SAFE_FREE(tmp_remote_machine);
 
@@ -185,9 +187,10 @@ void sub_set_smb_name(const char *name)
                return;
        }
 
+       /* alpha_strcpy includes the space for the terminating nul. */
        alpha_strcpy(smb_user_name, tmp,
                        SAFE_NETBIOS_CHARS,
-                       len);
+                       len+1);
 
        SAFE_FREE(tmp);
 


-- 
Samba Shared Repository

Reply via email to