mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
* grub-core/lib/libgcrypt/mpi/mpih-div.c (_gcry_mpih_divrem):
Use grub_fatal rather than divide by zero. * grub-core/lib/libgcrypt/mpi/mpi-pow.c (gcry_mpi_powm): Likewise.
This commit is contained in:
1 parent
d6d8e9a93e
commit
b9563c9451
3 files changed
+9
-2
No files matched your search
@@ -77,7 +77,7 @@ gcry_mpi_powm (gcry_mpi_t res,
|
||||
ep = expo->d;
|
||||
|
||||
if (!msize)
|
||||
msize = 1 / msize; /* Provoke a signal. */
|
||||
grub_fatal ("mpi division by zero");
|
||||
|
||||
if (!esize)
|
||||
{
|
||||
|
||||
@@ -214,7 +214,8 @@ _gcry_mpih_divrem( mpi_ptr_t qp, mpi_size_t qextra_limbs,
|
||||
case 0:
|
||||
/* We are asked to divide by zero, so go ahead and do it! (To make
|
||||
the compiler not remove this statement, return the value.) */
|
||||
return 1 / dsize;
|
||||
grub_fatal ("mpi division by zero");
|
||||
return 0;
|
||||
|
||||
case 1:
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user