* 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:
Vladimir Serbinenko 2013-11-08 16:33:48 +01:00
parent d6d8e9a93e
commit b9563c9451
3 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2013-11-08 Vladimir Serbinenko <phcoder@gmail.com>
* 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.
2013-11-08 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/gui.h (grub_fixed_sfs_divide): Round rather than

View file

@ -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)
{

View file

@ -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:
{