Skip to content
Snippets Groups Projects
Commit 4cd66139 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

core: update_crypto: Ensure we don't overflow while shifting


(cherry picked from commit 984407ba)
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 4df4378f
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ static inline uint32_t scalar_number( const uint8_t *p, int header_len )
else if( header_len == 2 )
return( (p[0] << 8) + p[1] );
else if( header_len == 4 )
return( (p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3] );
return( ((uint32_t)p[0] << 24) + (p[1] << 16) + (p[2] << 8) + p[3] );
else
abort();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment