X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=crypto%2Frsa.c;h=b9cd11fb7d3672245f49960901f349e3efe16c2f;hb=refs%2Fheads%2Faccepted%2Ftizen_unified_toolchain;hp=c79613cdce6e443aacdc4477315e4765a9210990;hpb=a9943ad3dddb04763e73649ade8ed726a17b5ec3;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/crypto/rsa.c b/crypto/rsa.c index c79613c..b9cd11f 100644 --- a/crypto/rsa.c +++ b/crypto/rsa.c @@ -220,6 +220,8 @@ static int rsa_check_exponent_fips(MPI e) } e_max = mpi_alloc(0); + if (!e_max) + return -ENOMEM; mpi_set_bit(e_max, 256); if (mpi_cmp(e, e_max) >= 0) {