1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-22 05:57:43 +03:00

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>
This commit is contained in:
Andreas Schneider 2017-02-16 17:34:07 +01:00 committed by Jeremy Allison
parent e6105f92cd
commit 79a49dc19a

View File

@ -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;