mpi: Improve gcry_mpi_invm to detect bad input.
authorWerner Koch <wk@gnupg.org>
Mon, 5 Aug 2013 16:58:41 +0000 (18:58 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 5 Aug 2013 16:58:41 +0000 (18:58 +0200)
commitd8e99a04dba6a606e879464cd11deee760d1e000
treebd5b967887f40e6860561058c34756372c04684e
parent10dfa41b43a906031bc674ea41cd3073701011f3
mpi: Improve gcry_mpi_invm to detect bad input.

* mpi/mpi-inv.c (gcry_mpi_invm): Return 0 for bad input.
--

Without this patch the function may enter and endless loop.

Signed-off-by: Werner Koch <wk@gnupg.org>
mpi/mpi-inv.c