mirror of https://github.com/wolfSSL/wolfssl.git
Review comment in sp_int file
parent
d03971e233
commit
5d7649c959
|
@ -192,7 +192,7 @@ int sp_read_unsigned_bin(sp_int* a, const byte* in, word32 inSz)
|
|||
int i, j = 0, k;
|
||||
|
||||
/* Extra digit added to SP_INT_DIGITS to be used in calculations. */
|
||||
if (inSz > SP_INT_DIGITS * (int)sizeof(a->dp[0])) {
|
||||
if (inSz > (SP_INT_DIGITS - 1) * (int)sizeof(a->dp[0])) {
|
||||
err = MP_VAL;
|
||||
}
|
||||
else if (inSz == 0) {
|
||||
|
@ -1063,8 +1063,10 @@ int sp_add_d(sp_int* a, sp_int_digit d, sp_int* r)
|
|||
}
|
||||
}
|
||||
r->dp[0] = t;
|
||||
if (r != a) {
|
||||
for (++i; i < a->used; i++)
|
||||
r->dp[i] = a->dp[i];
|
||||
}
|
||||
|
||||
return MP_OKAY;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue