The branch, master has been updated
       via  a6f5e49... s4:registry - "LDB backend" - revert the length check 
for UTF16 strings
      from  f39ef98... Revert "s4:torture - WINREG RPC - reactivate test 
"SetValueExtended" for s4"

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


- Log -----------------------------------------------------------------
commit a6f5e495b1aa87982ee69c17b098e27010bed756
Author: Matthias Dieter Wallnöfer <mwallnoe...@yahoo.de>
Date:   Tue Mar 23 00:24:32 2010 +0100

    s4:registry - "LDB backend" - revert the length check for UTF16 strings
    
    Let this do the "convert_string_talloc" function as it was before.

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

Summary of changes:
 source4/lib/registry/ldb.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index ec0b33a..a4675c8 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -155,16 +155,11 @@ static struct ldb_message *reg_ldb_pack_value(struct 
ldb_context *ctx,
                                return NULL;
                        }
 
-                       /* Only when the "data.length" is dividable by two try
-                        * the charset conversion, otherwise stick with the
-                        * default of the "ret2" variable set to "false". */
-                       if (data.length % 2 == 0) {
-                               /* The data is provided as UTF16 string */
-                               ret2 = convert_string_talloc(mem_ctx, CH_UTF16, 
CH_UTF8,
-                                                            (void *)data.data, 
data.length,
-                                                            (void 
**)&val->data, &val->length,
-                                                            false);
-                       }
+                       /* The data is provided as UTF16 string */
+                       ret2 = convert_string_talloc(mem_ctx, CH_UTF16, CH_UTF8,
+                                                    (void *)data.data, 
data.length,
+                                                    (void **)&val->data, 
&val->length,
+                                                    false);
                        if (ret2) {
                                ret = ldb_msg_add_value(msg, "data", val, NULL);
                        }


-- 
Samba Shared Repository

Reply via email to