summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2023-03-28 11:38:15 +1300
committerAndrew Bartlett <abartlet@samba.org>2023-03-31 01:48:30 +0000
commit053aa5165384e5f31a96a630bb28197661b39337 (patch)
treed342cd72b4c512969883773c9dda75f9c7efdb39 /librpc
parente37f20fb36a1bda3e121dba5d8042efeb84ed7e3 (diff)
downloadsamba-053aa5165384e5f31a96a630bb28197661b39337.tar.gz
ndrdump: Allow a long string of hexidecimal digits as well as a hex dump for --hex-input
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'librpc')
-rw-r--r--librpc/tools/ndrdump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/librpc/tools/ndrdump.c b/librpc/tools/ndrdump.c
index 0d39ed3714b..26f885ccd10 100644
--- a/librpc/tools/ndrdump.c
+++ b/librpc/tools/ndrdump.c
@@ -549,6 +549,8 @@ static void ndr_print_dummy(struct ndr_print *ndr, const char *format, ...)
TALLOC_FREE(mem_ctx);
exit(1);
+ } else if (hex_input && size >= 1 && data[0] != '[') {
+ blob = strhex_to_data_blob(mem_ctx, (const char *)data);
} else if (hex_input) {
blob = hexdump_to_data_blob(mem_ctx, (const char *)data, size);
} else if (base64_input) {