Make sure ecc key is always memset to 0

This commit is contained in:
Sean Parkinson 2017-02-17 12:15:18 -08:00
parent 3e6ef835b1
commit bdd3f2be41

View File

@ -4899,6 +4899,7 @@ static int wc_ecc_import_raw_private(ecc_key* key, const char* qx,
return BAD_FUNC_ARG;
}
XMEMSET(key, 0, sizeof(ecc_key));
/* set curve type and index */
err = wc_ecc_set_curve(key, 0, curve_id);
if (err != 0) {