|
|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
mpi_resize() returns -ENOMEM on error and 0 on success. Signed-off-by: Adarsh J <root@xxxxxxxxxxxxx> --- lib/mpi/mpicoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index f26b41f..9949b69 100644 --- a/lib/mpi/mpicoder.c +++ b/lib/mpi/mpicoder.c @@ -98,7 +98,7 @@ int mpi_fromstr(MPI val, const char *str) nbytes = (nbits + 7) / 8; nlimbs = (nbytes + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB; if (val->alloced < nlimbs) - if (!mpi_resize(val, nlimbs)) + if (mpi_resize(val, nlimbs) < 0) return -ENOMEM; i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; i %= BYTES_PER_MPI_LIMB; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Fedora Maintainers] [Fedora Desktop] [Fedora SELinux] [Yosemite News] [Yosemite Photos] [KDE Users] [Fedora Tools]