~ubuntu-branches/ubuntu/vivid/dropbear/vivid

« back to all changes in this revision

Viewing changes to libtommath/bn_mp_exptmod_fast.c

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2011-11-16 12:36:03 UTC
  • mfrom: (1.4.4)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20111116123603-qkpk0p5e3gegporw
ImportĀ upstreamĀ versionĀ 2011.54

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
  /* init M array */
69
69
  /* init first cell */
70
 
  if ((err = mp_init(&M[1])) != MP_OKAY) {
 
70
  if ((err = mp_init_size(&M[1], P->alloc)) != MP_OKAY) {
71
71
     return err;
72
72
  }
73
73
 
74
74
  /* now init the second half of the array */
75
75
  for (x = 1<<(winsize-1); x < (1 << winsize); x++) {
76
 
    if ((err = mp_init(&M[x])) != MP_OKAY) {
 
76
    if ((err = mp_init_size(&M[x], P->alloc)) != MP_OKAY) {
77
77
      for (y = 1<<(winsize-1); y < x; y++) {
78
78
        mp_clear (&M[y]);
79
79
      }
133
133
  }
134
134
 
135
135
  /* setup result */
136
 
  if ((err = mp_init (&res)) != MP_OKAY) {
 
136
  if ((err = mp_init_size (&res, P->alloc)) != MP_OKAY) {
137
137
    goto LBL_M;
138
138
  }
139
139