1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ndrdump: Do not run the validate step after a failure

This avoids ending a failed parse with 'dump OK'

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2019-11-20 18:54:28 +13:00
parent ef0257b105
commit b866018c2c

View File

@ -638,6 +638,14 @@ static void ndr_print_dummy(struct ndr_print *ndr, const char *format, ...)
} }
} }
/* Do not proceed to validate if we got an error */
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
printf("dump of failed-to-parse %s complete\n",
f->name);
TALLOC_FREE(mem_ctx);
exit(2);
}
if (validate) { if (validate) {
DATA_BLOB v_blob; DATA_BLOB v_blob;
struct ndr_push *ndr_v_push; struct ndr_push *ndr_v_push;