[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Apr 8 13:45:03 MDT 2014


The branch, master has been updated
       via  8f46b13 s3-lib/util: fix read across end of namelist string
       via  85041c8 wafsamba: replace dots in library names
      from  9d91f01 s4-wbclient: Cope with winbind returning an error

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8f46b130c5c796d66d26982f5cd99c52f7c8ece1
Author: Björn Baumbach <bb at sernet.de>
Date:   Mon Apr 7 13:46:42 2014 +0200

    s3-lib/util: fix read across end of namelist string
    
    If the namelist is not terminated with a '/', we try to read
    the next character after the string termination '\0'.
    
    Signed-off-by: Björn Baumbach <bb at sernet.de>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Apr  8 21:44:16 CEST 2014 on sn-devel-104

commit 85041c88d8c2755448d3d659ca7261c4ebf1ec29
Author: Ralph Boehme <rb at sernet.de>
Date:   Thu Mar 27 16:37:18 2014 +0100

    wafsamba: replace dots in library names
    
    Certain libraries use a version number with a dot in the library name,
    eg libtracker-sparql-0.16. The dot is passed to the HAVE_LIBXXX macro
    but dots aren't allowed in C macros, compiler diagnostic:
    
      warning: missing whitespace after the macro name
    
    Signed-off-by: Ralph Boehme <rb at sernet.de>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 buildtools/wafsamba/samba_autoconf.py |    2 +-
 source3/lib/util.c                    |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 316aeda..59d9e79 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -567,7 +567,7 @@ int foo()
                 if set_target:
                     SET_TARGET_TYPE(conf, lib, 'EMPTY')
         else:
-            conf.define('HAVE_LIB%s' % lib.upper().replace('-','_'), 1)
+            conf.define('HAVE_LIB%s' % lib.upper().replace('-','_').replace('.','_'), 1)
             conf.env['LIB_' + lib.upper()] = lib
             if set_target:
                 conf.SET_TARGET_TYPE(lib, 'SYSLIB')
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 374bc5d..d061200 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1035,6 +1035,7 @@ void set_namearray(name_compare_entry **ppname_array, const char *namelist_in)
 {
 	char *name_end;
 	char *namelist;
+	char *namelist_end;
 	char *nameptr;
 	int num_entries = 0;
 	int i;
@@ -1051,12 +1052,14 @@ void set_namearray(name_compare_entry **ppname_array, const char *namelist_in)
 	}
 	nameptr = namelist;
 
+	namelist_end = &namelist[strlen(namelist)];
+
 	/* We need to make two passes over the string. The
 		first to count the number of elements, the second
 		to split it.
 	*/
 
-	while(*nameptr) {
+	while(nameptr <= namelist_end) {
 		if ( *nameptr == '/' ) {
 			/* cope with multiple (useless) /s) */
 			nameptr++;
@@ -1090,7 +1093,7 @@ void set_namearray(name_compare_entry **ppname_array, const char *namelist_in)
 	/* Now copy out the names */
 	nameptr = namelist;
 	i = 0;
-	while(*nameptr) {
+	while(nameptr <= namelist_end) {
 		if ( *nameptr == '/' ) {
 			/* cope with multiple (useless) /s) */
 			nameptr++;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list