1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3: net: Harden act_val_hex() act_val_sz() against errors.

Found by Michael Hanselmann using fuzzing tools

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13842

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Jeremy Allison 2019-03-25 11:13:24 -07:00 committed by Andrew Bartlett
parent 226544f6f5
commit b3bfad39d6

View File

@ -117,6 +117,7 @@ static bool act_val_hex(struct reg_parse* p, cbuf* value, bool cont)
cbuf_swapptr(p->valblob, &dst, dlen);
} else {
DEBUG(0, ("iconvert_talloc failed\n"));
return false;
}
talloc_free(dst);
}
@ -166,6 +167,7 @@ static bool act_val_sz(struct reg_parse* p, cbuf* value, bool cont)
} else {
DEBUG(0, ("convert_string_talloc failed: >%s<\n"
"use it as is\t", src));
return false;
}
talloc_free(dst);