KEYGEN: improve error handling, be less fault tolerant

This commit is contained in:
hasufell 2014-06-27 22:40:49 +02:00
parent cef08a4ae0
commit 05582c4bed
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 3 additions and 3 deletions

View File

@ -55,8 +55,8 @@ ntru_create_keypair(
Fp,
pub;
if (!f || !g || !params)
goto _return;
if (!pair || !f || !g || !params)
NTRU_ABORT_DEBUG("Unexpected NULL parameters in");
fmpz_poly_init(Fq);
fmpz_poly_init(Fp);
@ -86,7 +86,7 @@ _cleanup:
fmpz_poly_clear(Fq);
fmpz_poly_clear(Fp);
fmpz_poly_clear(pub);
_return:
return retval;
}