[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Sun May 7 01:29:04 UTC 2017


The branch, master has been updated
       via  202e2ab s3-rpcclient: Fix enumdata spoolss display of REG_DWORD
      from  a503437 s3/smbd: update exclusive oplock optimisation to the lease area

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


- Log -----------------------------------------------------------------
commit 202e2ab5e14fdd70b78dbbd48685e44f22b0d51d
Author: G√ľnther Deschner <gd at samba.org>
Date:   Wed May 3 11:31:20 2017 +0200

    s3-rpcclient: Fix enumdata spoolss display of REG_DWORD
    
    One should not assume a REG_DWORD is always 4 byte long.
    
    In an enumdata(ex) context, the first reply will return with content
    in a buffer that can fill the largest entry in the array of attributes.
    All subsequent queries then reuse this buffer even if the key/value
    pair in question then is just a 4 byte DWORD. The remaining buffer
    will be just empty and of no interest.
    
    Signed-off-by: Guenther Deschner <gd at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sun May  7 03:28:21 CEST 2017 on sn-devel-144

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

Summary of changes:
 source3/rpcclient/cmd_spoolss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 00dc2e0..34cbb7e 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -770,7 +770,7 @@ static void display_reg_value(const char *name, enum winreg_Type type, DATA_BLOB
 
 	switch(type) {
 	case REG_DWORD:
-		if (blob.length == sizeof(uint32_t)) {
+		if (blob.length >= sizeof(uint32_t)) {
 			printf("%s: REG_DWORD: 0x%08x\n", name, IVAL(blob.data,0));
 		} else {
 			printf("%s: REG_DWORD: <invalid>\n", name);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list