From 7c4f869678ae68faf792ba64064ccc11e2788692 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 3 May 2014 17:03:52 +0000 Subject: Avoid GCC 4.9 strict-overflow warning --- src/lib/math/mp/mp_shift.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/math/mp/mp_shift.cpp b/src/lib/math/mp/mp_shift.cpp index 0531658ec..b35f3a00b 100644 --- a/src/lib/math/mp/mp_shift.cpp +++ b/src/lib/math/mp/mp_shift.cpp @@ -1,6 +1,6 @@ /* * MP Shift Algorithms -* (C) 1999-2007 Jack Lloyd +* (C) 1999-2007,2014 Jack Lloyd * * Distributed under the terms of the Botan license */ @@ -19,8 +19,7 @@ void bigint_shl1(word x[], size_t x_size, size_t word_shift, size_t bit_shift) { if(word_shift) { - for(size_t j = 1; j != x_size + 1; ++j) - x[(x_size - j) + word_shift] = x[x_size - j]; + copy_mem(x + word_shift, x, x_size); clear_mem(x, word_shift); } -- cgit v1.2.3