ASCII->POLY: fix possible junk data at end of string

This commit is contained in:
hasufell 2014-05-26 10:56:31 +02:00
parent a1bd81b2f2
commit 96a36515ab
1 changed files with 2 additions and 0 deletions

View File

@ -187,6 +187,8 @@ poly_to_ascii(fmpz_poly_t **poly_array, ntru_context *ctx)
binary_rep[i] = '0';
else if (fmpz_cmp_si(coeff, -1))
binary_rep[i] = '1';
} else {
binary_rep[i] = '0';
}
i++;
}