Skip to content

Commit

Permalink
Fix a warning on Windows builders
Browse files Browse the repository at this point in the history
  • Loading branch information
msprotz committed Jan 31, 2023
1 parent 92033ad commit c670530
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Modules/sha256module.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ static void update_256(Hacl_Streaming_SHA2_state_sha2_256 *state, uint8_t *buf,
len -= UINT32_MAX;
buf += UINT32_MAX;
}
Hacl_Streaming_SHA2_update_256(state, buf, len);
/* Cast to uint32_t is safe: upon exiting the loop, len <= UINT32_MAX, and
* therefore fits in a uint32_t */
Hacl_Streaming_SHA2_update_256(state, buf, (uint32_t) len);
}


Expand Down

0 comments on commit c670530

Please sign in to comment.