Re: [Keyrings] [PATCH 1/2] MPILIB: Fix comparison of negative MPIs

2015-01-10 Thread Dmitry Kasatkin
Hi, Thank you. It looks correct. Ack. - Dmitry On 9 January 2015 at 12:58, David Howells wrote: > I think you're right - *adding* the two sizes makes no sense. cc'ing Dmitry > also for his check. > > David > > > Rasmus Villemoes wrote: > >> If u and v both represent negative integers and the

Re: [PATCH 1/2] MPILIB: Fix comparison of negative MPIs

2015-01-09 Thread David Howells
I think you're right - *adding* the two sizes makes no sense. cc'ing Dmitry also for his check. David Rasmus Villemoes wrote: > If u and v both represent negative integers and their limb counts > happen to differ, mpi_cmp will always return a positive value - this > is obviously bogus. u is s

[PATCH 1/2] MPILIB: Fix comparison of negative MPIs

2014-12-05 Thread Rasmus Villemoes
If u and v both represent negative integers and their limb counts happen to differ, mpi_cmp will always return a positive value - this is obviously bogus. u is smaller than v if and only if it is larger in absolute value. Signed-off-by: Rasmus Villemoes --- lib/mpi/mpi-cmp.c | 2 +- 1 file chang