Skip to content

Commit

Permalink
Merge pull request #122 from haitaohuang/master
Browse files Browse the repository at this point in the history
Fix signed integer overflow on shift
  • Loading branch information
haitaohuang authored Aug 6, 2020
2 parents bf768a4 + 0a6d266 commit b0a445b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sgx_encl.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ static u32 sgx_calc_ssaframesize(u32 miscselect, u64 xfrm)
int i;

for (i = 2; i < 64; i++) {
if (!((1 << i) & xfrm))
if (!((1UL << i) & xfrm))
continue;

size = SGX_SSA_GPRS_SIZE + sgx_xsave_size_tbl[i];
Expand Down

0 comments on commit b0a445b

Please sign in to comment.