POLY: improve error handling

This commit is contained in:
hasufell 2014-06-27 16:05:50 +02:00
parent 1ed32d0193
commit 772877e992
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,9 @@ poly_new(fmpz_poly_t new_poly,
int const * const c,
const size_t len)
{
if (!new_poly)
NTRU_ABORT_DEBUG("Unexpected NULL parameter in");
fmpz_poly_init(new_poly);
for (uint32_t i = 0; i < len; i++)