Skip to content

Commit

Permalink
Change cast to const unsigned char *
Browse files Browse the repository at this point in the history
  • Loading branch information
skmcgrail committed Oct 27, 2023
1 parent 67c371f commit 5a90560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/fipsmodule/bn/bytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static int fits_in_bytes(const BN_ULONG *words, size_t num_words,
}

void bn_assert_fits_in_bytes(const BIGNUM *bn, size_t num) {
const uint8_t *bytes = (const uint8_t *)bn->d;
const unsigned char *bytes = (const unsigned char *)bn->d;
size_t tot_bytes = bn->width * sizeof(BN_ULONG);
if (tot_bytes > num) {
CONSTTIME_DECLASSIFY(bytes + num, tot_bytes - num);
Expand Down

0 comments on commit 5a90560

Please sign in to comment.