[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Mon Mar 22 06:41:23 MDT 2010


The branch, master has been updated
       via  43bb87f... s4:registry - "patchfile" - check if strings could be allocated
      from  686825e... s4:registry - "patchfile" - initialise the data blobs

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


- Log -----------------------------------------------------------------
commit 43bb87f5fa8fb23aee816636cefeb509397e7291
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Mon Mar 22 13:39:40 2010 +0100

    s4:registry - "patchfile" - check if strings could be allocated

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

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


Changeset truncated at 500 lines:

diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c
index 9a4c9a6..2932910 100644
--- a/source4/lib/registry/patchfile.c
+++ b/source4/lib/registry/patchfile.c
@@ -95,6 +95,11 @@ WERROR reg_generate_diff_key(struct registry_key *oldkey,
 		/* if "error2" is going to be "WERR_BADFILE", then newkey */
 		/* didn't have such a subkey and therefore add a del diff */
 		tmppath = talloc_asprintf(mem_ctx, "%s\\%s", path, keyname1);
+		if (tmppath == NULL) {
+			DEBUG(0, ("Out of memory\n"));
+			talloc_free(mem_ctx);
+			return WERR_NOMEM;
+		}
 		if (!W_ERROR_IS_OK(error2))
 			callbacks->del_key(callback_data, tmppath);
 
@@ -156,6 +161,11 @@ WERROR reg_generate_diff_key(struct registry_key *oldkey,
 
 		/* oldkey didn't have such a subkey, add a add diff */
 		tmppath = talloc_asprintf(mem_ctx, "%s\\%s", path, keyname1);
+		if (tmppath == NULL) {
+			DEBUG(0, ("Out of memory\n"));
+			talloc_free(mem_ctx);
+			return WERR_NOMEM;
+		}
 		callbacks->add_key(callback_data, tmppath);
 
 		/* perform here also the recursive invocation */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list