Change shift expressions to unsigned types. Shifting signed values to
a result that is not representable has undefined behaviour.
This commit is contained in:
parent
7e2aa2c627
commit
ed1794fe17
6 changed files with 11 additions and 8 deletions
|
@ -106,8 +106,11 @@ static void copy64(uint32_t *M, byte *in)
|
|||
int i;
|
||||
|
||||
for (i=0;i<16;i++)
|
||||
M[i] = (in[i*4+3]<<24) | (in[i*4+2]<<16) |
|
||||
(in[i*4+1]<<8) | (in[i*4+0]<<0);
|
||||
M[i] =
|
||||
((uint32_t)in[i*4+3] << 24) |
|
||||
((uint32_t)in[i*4+2] << 16) |
|
||||
((uint32_t)in[i*4+1] << 8) |
|
||||
((uint32_t)in[i*4+0] << 0) ;
|
||||
}
|
||||
|
||||
static void copy4(byte *out,uint32_t x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue