Skip to content

Commit

Permalink
update length type from int to size_t
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinav Saxena <[email protected]>
  • Loading branch information
abhinav-thales committed Oct 8, 2024
1 parent e08e63c commit f2a2b4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_kem.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static OQS_STATUS kem_test_correctness(const char *method_name) {
if ((0 == strcasecmp(method_name, "ML-KEM-512")) || (0 == strcasecmp(method_name, "ML-KEM-768")) || (0 == strcasecmp(method_name, "ML-KEM-1024"))) {
// buffer to hold z and c. z is always 32 bytes
uint8_t *buff_z_c = NULL;
int length_z_c = 32 + kem->length_ciphertext;
size_t length_z_c = (size_t)32 + kem->length_ciphertext;
buff_z_c = malloc(length_z_c) ;
if (NULL == buff_z_c) {
fprintf(stderr, "ERROR: malloc failed\n");
Expand Down

0 comments on commit f2a2b4d

Please sign in to comment.