git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3194baa
)
ndrdump: Check for input decode failures
author
Andrew Bartlett
<abartlet@samba.org>
Tue, 19 Nov 2019 20:59:07 +0000
(09:59 +1300)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 20 Nov 2019 04:41:28 +0000
(
04:41
+0000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
librpc/tools/ndrdump.c
patch
|
blob
|
history
diff --git
a/librpc/tools/ndrdump.c
b/librpc/tools/ndrdump.c
index 18c3246253272036fef3b94b5fcaf7863d40ca3e..31f82c27d992e74860cd2faa5292995153e17d4b 100644
(file)
--- a/
librpc/tools/ndrdump.c
+++ b/
librpc/tools/ndrdump.c
@@
-505,6
+505,12
@@
static void ndr_print_dummy(struct ndr_print *ndr, const char *format, ...)
blob = data_blob_const(data, size);
}
+ if (data != NULL && blob.data == NULL) {
+ printf("failed to decode input data\n");
+ TALLOC_FREE(mem_ctx);
+ exit(1);
+ }
+
ndr_pull = ndr_pull_init_blob(&blob, mem_ctx);
if (ndr_pull == NULL) {
perror("ndr_pull_init_blob");