talloc_steal the data pointers of pub_key, modulus and exponent onto pub_key.
To allow fuzz testing of ndr_pull_KeyMaterialInternal the KeyMaterialInternal
struct may not be a talloc_context. So the data portions will be allocated on
the ndr context.
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
TALLOC_FREE(*pub_key);
goto out;
}
+ /*
+ * Steal modulus and exponent data from the ndr context onto the pub_key
+ */
+ talloc_steal(*pub_key, (*pub_key)->modulus.data);
+ talloc_steal(*pub_key, (*pub_key)->exponent.data);
out:
TALLOC_FREE(tmp_ctx);