Skip to content

Commit

Permalink
Clear undefined behavior in libgcry.c (GH #5167)
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Jun 28, 2023
1 parent fa9ac84 commit 24bba05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/libgcry.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ seedIV(gcryfile gf, uchar **iv)
if(shift == 0) { /* need new random data? */
rndnum = randomNumber();
}
(*iv)[i] = 0xff & ((rndnum & (0xff << shift)) >> shift);
(*iv)[i] = 0xff & ((rndnum & (255u << shift)) >> shift);
}
finalize_it:
RETiRet;
Expand Down

0 comments on commit 24bba05

Please sign in to comment.