~ubuntu-branches/ubuntu/utopic/dropbear/utopic-proposed

« back to all changes in this revision

Viewing changes to libtommath/bn_mp_exteuclid.c

  • Committer: Bazaar Package Importer
  • Author(s): Matt Johnston
  • Date: 2005-12-08 19:20:21 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051208192021-nyp9rwnt77nsg6ty
Tags: 0.47-1
* New upstream release.
* SECURITY: Fix incorrect buffer sizing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
       if ((err = mp_copy(&t3, &v3)) != MP_OKAY)                                  { goto _ERR; }
60
60
   }
61
61
 
 
62
   /* make sure U3 >= 0 */
 
63
   if (u3.sign == MP_NEG) {
 
64
      mp_neg(&u1, &u1);
 
65
      mp_neg(&u2, &u2);
 
66
      mp_neg(&u3, &u3);
 
67
   }
 
68
 
62
69
   /* copy result out */
63
70
   if (U1 != NULL) { mp_exch(U1, &u1); }
64
71
   if (U2 != NULL) { mp_exch(U2, &u2); }