summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-02-16 17:34:07 +0100
committerJeremy Allison <jra@samba.org>2017-02-23 03:18:10 +0100
commit79a49dc19a83bd22684a71aecf4588b753669039 (patch)
treefee89ad8e1ee144b2c91372906d44bbb1d8a3780 /librpc
parente6105f92cd24de49acecd67a9f0c2c53323fe2e9 (diff)
downloadsamba-79a49dc19a83bd22684a71aecf4588b753669039.tar.gz
ndrdump: Fix a possible NULL pointer dereference
Found by covscan. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12592 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r--librpc/tools/ndrdump.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/librpc/tools/ndrdump.c b/librpc/tools/ndrdump.c
index b1e96b8a842..e26d3719429 100644
--- a/librpc/tools/ndrdump.c
+++ b/librpc/tools/ndrdump.c
@@ -502,6 +502,10 @@ static void ndr_print_dummy(struct ndr_print *ndr, const char *format, ...)
bool differ;
ndr_v_push = ndr_push_init_ctx(mem_ctx);
+ if (ndr_v_push == NULL) {
+ printf("No memory\n");
+ exit(1);
+ }
if (assume_ndr64) {
ndr_v_push->flags |= LIBNDR_FLAG_NDR64;