diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 01:46:58 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 01:46:58 +0000 |
commit | 79041310665c9b0b93c368bb1f7cef5f669a419e (patch) | |
tree | 6bc4e408ccf37c1d3f4466cf50aa5193f106390a /protocols | |
parent | ce2af47d41cc790df1b18d9e80295a38747de19f (diff) |
Sametime: check arg before use
git-svn-id: http://svn.miranda-ng.org/main/trunk@11164 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Sametime/src/meanwhile/src/mpi/mpi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Sametime/src/meanwhile/src/mpi/mpi.c b/protocols/Sametime/src/meanwhile/src/mpi/mpi.c index 29626c80a2..3a18c99050 100644 --- a/protocols/Sametime/src/meanwhile/src/mpi/mpi.c +++ b/protocols/Sametime/src/meanwhile/src/mpi/mpi.c @@ -1644,7 +1644,7 @@ mw_mp_err mw_mp_exptmod(mw_mp_int *a, mw_mp_int *b, mw_mp_int *m, mw_mp_int *c) mw_mp_int s, x, mu; mw_mp_err res; mw_mp_digit d, *db; - mw_mp_size ub = USED(b); + mw_mp_size ub; /// Miranda NG adaptation start - MSVC ///int dig, bit; int bit; @@ -1674,6 +1674,7 @@ mw_mp_err mw_mp_exptmod(mw_mp_int *a, mw_mp_int *b, mw_mp_int *m, mw_mp_int *c) /* Loop over digits of b in ascending order, except highest order */ db = DIGITS(b); + ub = USED(b); for(dig = 0; dig < (ub - 1); dig++) { d = *db++; |