Skip to content

Commit

Permalink
bugfix: correct calculation of fips indicator list length
Browse files Browse the repository at this point in the history
Signed-off-by: Joerg Schmidbauer <[email protected]>
  • Loading branch information
jschmidb committed Jan 22, 2024
1 parent 841a8ab commit de310f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/s390_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,11 +799,11 @@ int s390_get_fips_indicator(libica_fips_indicator_element *indicator_list,
return EINVAL;

if (!indicator_list) {
*indicator_list_len = sizeof(icaList) / sizeof(libica_fips_indicator_element);
*indicator_list_len = sizeof(icaList) / sizeof(libica_func_list_element_int);
return 0;
}

if (*indicator_list_len < (sizeof(icaList) / sizeof(libica_fips_indicator_element)))
if (*indicator_list_len < (sizeof(icaList) / sizeof(libica_func_list_element_int)))
return EINVAL;

for (i = 0; i < *indicator_list_len; i++) {
Expand Down

0 comments on commit de310f2

Please sign in to comment.