[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-41-g17c012c

Michael Adam obnox at samba.org
Wed Jul 9 10:58:36 GMT 2008


The branch, v4-0-test has been updated
       via  17c012c4645f4e9542537c15f80d9b4e74304d11 (commit)
      from  fafb8ad2b81b9a46cf8259bedc1dca5023b06115 (commit)

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


- Log -----------------------------------------------------------------
commit 17c012c4645f4e9542537c15f80d9b4e74304d11
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jul 9 12:48:05 2008 +0200

    Revert "tdbtool: fix off-by-one error in argument length. (bug #2344)"
    
    This reverts commit fafb8ad2b81b9a46cf8259bedc1dca5023b06115.
    
    This fix is not valid:
    
    1. convert_string() is not only used for key strings but also for data.
    
    2. Some databases use string_tdb_data() i.e. non-null-terminated strings
       as keynames and others (like the one I was using), use
       string_term_tdb_data(), i.e. zero-terminated key strings.
    
    After discussion with Metze, the easiest (and proper way) to
    handle this is to specify key names as "keyname\0" for databases
    which use string_term_tdb_data().
    
    Sorry for the noise...
    
    Michael

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

Summary of changes:
 source/lib/tdb/tools/tdbtool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/tdb/tools/tdbtool.c b/source/lib/tdb/tools/tdbtool.c
index 500e441..d104ccd 100644
--- a/source/lib/tdb/tools/tdbtool.c
+++ b/source/lib/tdb/tools/tdbtool.c
@@ -598,7 +598,7 @@ static char *convert_string(char *instring, size_t *sizep)
 	}
 	length++;
     }
-    *sizep = length + 1;
+    *sizep = length;
     return instring;
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list