[SCM] Samba Shared Repository - branch v4-3-test updated

Karolin Seeger kseeger at samba.org
Tue May 17 12:30:08 UTC 2016


The branch, v4-3-test has been updated
       via  e44c9b6 libcli/auth: let msrpc_parse() return talloc'ed empty strings
      from  3a69922 s3:libsmb/clifile use correct value for MaxParameterCount for setting EAs

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-3-test


- Log -----------------------------------------------------------------
commit e44c9b6c7739b13d192a887f9d84b6a78362b821
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon May 9 16:14:31 2016 +0200

    libcli/auth: let msrpc_parse() return talloc'ed empty strings
    
    This make it more predictable for the callers.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11912
    BUG: https://bugzilla.redhat.com/show_bug.cgi?id=1334356
    BUG: https://launchpad.net/bugs/1578576
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Mon May  9 22:27:21 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 58a83236294117d32d9883ac3024f81fa1730a87)
    
    Autobuild-User(v4-3-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-3-test): Tue May 17 14:29:44 CEST 2016 on sn-devel-104

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

Summary of changes:
 libcli/auth/msrpc_parse.c | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/auth/msrpc_parse.c b/libcli/auth/msrpc_parse.c
index d499d9e..74a7bcc 100644
--- a/libcli/auth/msrpc_parse.c
+++ b/libcli/auth/msrpc_parse.c
@@ -262,7 +262,11 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
 
 			ps = va_arg(ap, char **);
 			if (len1 == 0 && len2 == 0) {
-				*ps = (char *)discard_const("");
+				*ps = talloc_strdup(mem_ctx, "");
+				if (*ps == NULL) {
+					ret = false;
+					goto cleanup;
+				}
 			} else {
 				/* make sure its in the right format - be strict */
 				if ((len1 != len2) || (ptr + len1 < ptr) || (ptr + len1 < len1) || (ptr + len1 > blob->length)) {
@@ -289,7 +293,11 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
 						goto cleanup;
 					}
 				} else {
-					(*ps) = (char *)discard_const("");
+					*ps = talloc_strdup(mem_ctx, "");
+					if (*ps == NULL) {
+						ret = false;
+						goto cleanup;
+					}
 				}
 			}
 			break;
@@ -302,7 +310,11 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
 			ps = (char **)va_arg(ap, char **);
 			/* make sure its in the right format - be strict */
 			if (len1 == 0 && len2 == 0) {
-				*ps = (char *)discard_const("");
+				*ps = talloc_strdup(mem_ctx, "");
+				if (*ps == NULL) {
+					ret = false;
+					goto cleanup;
+				}
 			} else {
 				if ((len1 != len2) || (ptr + len1 < ptr) || (ptr + len1 < len1) || (ptr + len1 > blob->length)) {
 					ret = false;
@@ -325,7 +337,11 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
 						goto cleanup;
 					}
 				} else {
-					(*ps) = (char *)discard_const("");
+					*ps = talloc_strdup(mem_ctx, "");
+					if (*ps == NULL) {
+						ret = false;
+						goto cleanup;
+					}
 				}
 			}
 			break;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list