[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed May 15 00:46:03 UTC 2019


The branch, master has been updated
       via  28518c579d4 s3:libsmb: Add missing OOM check in fill_quota_buffer()
      from  9345d11c44e docs: add vfs_ceph_snapshots manpage

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


- Log -----------------------------------------------------------------
commit 28518c579d485389ed4f2951de5f49f16ee53680
Author: Andreas Schneider <asn at samba.org>
Date:   Tue May 14 12:48:14 2019 +0200

    s3:libsmb: Add missing OOM check in fill_quota_buffer()
    
    Found by covscan (csbuild).
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Noel Power <nopower at suse.com>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed May 15 00:45:58 UTC 2019 on sn-devel-184

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

Summary of changes:
 source3/libsmb/cliquota.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index 52f98eb9e8f..17655e095f3 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -587,13 +587,19 @@ NTSTATUS fill_quota_buffer(TALLOC_CTX *mem_ctx,
 			      SMB_NTQUOTA_LIST **end_ptr)
 {
 	int ndr_flags = NDR_SCALARS | NDR_BUFFERS;
-	struct ndr_push *qndr = ndr_push_init_ctx(mem_ctx);
+	struct ndr_push *qndr = NULL;
 	uint32_t start_offset = 0;
 	uint32_t padding = 0;
 	if (qlist == NULL) {
 		/* We must push at least one. */
 		return NT_STATUS_NO_MORE_ENTRIES;
 	}
+
+	qndr = ndr_push_init_ctx(mem_ctx);
+	if (qndr == NULL) {
+		return NT_STATUS_NO_MEMORY;
+	}
+
 	for (;qlist != NULL; qlist = qlist->next) {
 		struct file_quota_information info = {0};
 		enum ndr_err_code err;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list