Mercurial > dropbear
comparison libtommath/bn_mp_add_d.c @ 1511:5916af64acd4 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 17 Feb 2018 19:29:51 +0800 |
parents | 8bba51a55704 |
children | f52919ffd3b1 |
comparison
equal
deleted
inserted
replaced
1457:32f990cc96b1 | 1511:5916af64acd4 |
---|---|
47 } | 47 } |
48 | 48 |
49 /* old number of used digits in c */ | 49 /* old number of used digits in c */ |
50 oldused = c->used; | 50 oldused = c->used; |
51 | 51 |
52 /* sign always positive */ | |
53 c->sign = MP_ZPOS; | |
54 | |
55 /* source alias */ | 52 /* source alias */ |
56 tmpa = a->dp; | 53 tmpa = a->dp; |
57 | 54 |
58 /* destination alias */ | 55 /* destination alias */ |
59 tmpc = c->dp; | 56 tmpc = c->dp; |
94 * can fall through correctly | 91 * can fall through correctly |
95 */ | 92 */ |
96 ix = 1; | 93 ix = 1; |
97 } | 94 } |
98 | 95 |
96 /* sign always positive */ | |
97 c->sign = MP_ZPOS; | |
98 | |
99 /* now zero to oldused */ | 99 /* now zero to oldused */ |
100 while (ix++ < oldused) { | 100 while (ix++ < oldused) { |
101 *tmpc++ = 0; | 101 *tmpc++ = 0; |
102 } | 102 } |
103 mp_clamp(c); | 103 mp_clamp(c); |
105 return MP_OKAY; | 105 return MP_OKAY; |
106 } | 106 } |
107 | 107 |
108 #endif | 108 #endif |
109 | 109 |
110 /* $Source$ */ | 110 /* ref: $Format:%D$ */ |
111 /* $Revision$ */ | 111 /* git commit: $Format:%H$ */ |
112 /* $Date$ */ | 112 /* commit time: $Format:%ai$ */ |