Skip to content

Commit

Permalink
Fix C4333 warning by adjusting right shift operation on byte cast
Browse files Browse the repository at this point in the history
  • Loading branch information
gasbytes committed Dec 21, 2024
1 parent a1d77da commit bb67432
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -41409,8 +41409,7 @@ static int DefTicketEncCb(WOLFSSL* ssl, byte key_name[WOLFSSL_TICKET_NAME_SZ],
ret = args->lastErr;
args->lastErr = 0; /* reset */
/* On error 'ret' will be negative */
mask = ((byte)ret >>
((sizeof(ret) * 8) - 1)) - 1;
mask = (byte)((ret >> ((sizeof(ret) * 8) - 1)) & 0xFF) - 1;

/* build PreMasterSecret */
ssl->arrays->preMasterSecret[0] = ssl->chVersion.major;
Expand Down

0 comments on commit bb67432

Please sign in to comment.