10000 Fix a warning on Windows builders · python/cpython@c670530 · GitHub
[go: up one dir, main page]

Skip to content

Commit c670530

Browse files
committed
Fix a warning on Windows builders
1 parent 92033ad commit c670530

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Modules/sha256module.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ static void update_256(Hacl_Streaming_SHA2_state_sha2_256 *state, uint8_t *buf,
124124
len -= UINT32_MAX;
125125
buf += UINT32_MAX;
126126
}
127-
Hacl_Streaming_SHA2_update_256(state, buf, len);
127+
/* Cast to uint32_t is safe: upon exiting the loop, len <= UINT32_MAX, and
128+
* therefore fits in a uint32_t */
129+
Hacl_Streaming_SHA2_update_256(state, buf, (uint32_t) len);
128130
}
129131

130132

0 commit comments

Comments
 (0)
0