diff options
-rw-r--r-- | firmware/2lib/2rsa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/2lib/2rsa.c b/firmware/2lib/2rsa.c index 5d84ecd6..16edc26e 100644 --- a/firmware/2lib/2rsa.c +++ b/firmware/2lib/2rsa.c @@ -145,7 +145,8 @@ static void modpow(const struct vb2_public_key *key, uint8_t *inout, /* Convert from big endian byte array to little endian word array. */ for (i = 0; i < (int)key->arrsize; ++i) { uint32_t tmp = - (inout[((key->arrsize - 1 - i) * 4) + 0] << 24) | + ((uint32_t)inout[((key->arrsize - 1 - i) * 4) + 0] + << 24) | (inout[((key->arrsize - 1 - i) * 4) + 1] << 16) | (inout[((key->arrsize - 1 - i) * 4) + 2] << 8) | (inout[((key->arrsize - 1 - i) * 4) + 3] << 0); |