[PATCH] fix display of REG_DWORD in spoolss rpcclient
Günther Deschner
gd at samba.org
Thu May 4 09:44:50 UTC 2017
Hi,
please review and push.
Thanks,
Guenther
--
Günther Deschner GPG-ID: 8EE11688
Red Hat gdeschner at redhat.com
Samba Team gd at samba.org
-------------- next part --------------
From 6f8fd87e78e3a61feeae66219176c812f63acc3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Wed, 3 May 2017 11:31:20 +0200
Subject: [PATCH] s3-rpcclient: Fix enumdata spoolss display of REG_DWORD
One should not assume a REG_DWORD is always 4 byte long.
Guenther
Signed-off-by: Guenther Deschner <gd at samba.org>
---
source3/rpcclient/cmd_spoolss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index e5077d5..b7cdd5b 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);
--
2.9.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 201 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170504/32c8347a/signature.sig>
More information about the samba-technical
mailing list