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

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

parent 1778e11a
No related merge requests found
......@@ -62,7 +62,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