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

librpc: Fix manually written printer for drsuapi_DsAttributeValue

Credit to OSS-Fuzz

Found using the ndr_fuzz_X target.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2019-12-13 12:19:37 +13:00
parent 5ccb5e23c9
commit 0e651b4508
2 changed files with 9 additions and 7 deletions

View File

@ -113,12 +113,15 @@ static void _print_drsuapi_DsAttributeValue_str(struct ndr_print *ndr, const cha
ndr_print_struct(ndr, name, "drsuapi_DsAttributeValue"); ndr_print_struct(ndr, name, "drsuapi_DsAttributeValue");
ndr->depth++; ndr->depth++;
if (!convert_string_talloc(ndr, if (r->blob == NULL || r->blob->data == NULL) {
CH_UTF16, CH_UNIX, ndr_print_string(ndr, "string", "NULL");
r->blob->data, } else if (!convert_string_talloc(ndr,
r->blob->length, CH_UTF16, CH_UNIX,
&p, &converted_size)) { r->blob->data,
ndr_print_string(ndr, "string", "INVALID CONVERSION"); r->blob->length,
&p, &converted_size)) {
ndr_print_DATA_BLOB(ndr, "string (INVALID CONVERSION)",
*r->blob);
} else { } else {
char *str = (char *)p; char *str = (char *)p;
ndr_print_string(ndr, "string", str); ndr_print_string(ndr, "string", str);

View File

@ -1 +0,0 @@
^samba.tests.blackbox.ndrdump.samba.tests.blackbox.ndrdump.NdrDumpTests.test_fuzzed_drsuapi_DsGetNCChanges