summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-19 08:56:22 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:12 +0100
commita9e6240441583688388885cf48c5d3df09263784 (patch)
tree5390244da3c51991e69f7202f625922f4ee35b5f /librpc
parent318ecbc2085d2eaee9d24a77c1c3496185af2bdd (diff)
downloadsamba-a9e6240441583688388885cf48c5d3df09263784.tar.gz
ndrdump: Check return value of ndr_pull_init_blob().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r--librpc/tools/ndrdump.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/librpc/tools/ndrdump.c b/librpc/tools/ndrdump.c
index 4a102f5269..7247d80300 100644
--- a/librpc/tools/ndrdump.c
+++ b/librpc/tools/ndrdump.c
@@ -335,6 +335,10 @@ static NTSTATUS ndrdump_pull_and_print_pipes(const char *function,
blob.length = size;
ndr_pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (ndr_pull == NULL) {
+ perror("ndr_pull_init_blob");
+ exit(1);
+ }
ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
if (assume_ndr64) {
ndr_pull->flags |= LIBNDR_FLAG_NDR64;
@@ -377,6 +381,10 @@ static NTSTATUS ndrdump_pull_and_print_pipes(const char *function,
blob.length = size;
ndr_pull = ndr_pull_init_blob(&blob, mem_ctx);
+ if (ndr_pull == NULL) {
+ perror("ndr_pull_init_blob");
+ exit(1);
+ }
ndr_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
if (assume_ndr64) {
ndr_pull->flags |= LIBNDR_FLAG_NDR64;
@@ -459,6 +467,10 @@ static NTSTATUS ndrdump_pull_and_print_pipes(const char *function,
}
ndr_v_pull = ndr_pull_init_blob(&v_blob, mem_ctx);
+ if (ndr_v_pull == NULL) {
+ perror("ndr_pull_init_blob");
+ exit(1);
+ }
ndr_v_pull->flags |= LIBNDR_FLAG_REF_ALLOC;
ndr_err = f->ndr_pull(ndr_v_pull, flags, v_st);