Skip to content

Commit

Permalink
Fix potential infinite loops at 3 locations due to a type confusion i…
Browse files Browse the repository at this point in the history
…nt vs unsigned long long

Signed-off-by: Julien Vanegue <[email protected]>
  • Loading branch information
jvanegue authored and akshatsikarwar committed Dec 16, 2024
1 parent 74bd302 commit 8c91661
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bdb/temptable.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ static int create_temp_db_env(bdb_state_type *bdb_state, struct temp_table *tbl,
static int bdb_array_copy_to_temp_db(bdb_state_type *bdb_state,
struct temp_table *tbl, int *bdberr)
{
int rc = 0, ii;
int rc = 0;
unsigned long long ii;
DBT dbt_key, dbt_data;
struct temp_cursor *cur;
arr_elem_t *elem;
Expand Down Expand Up @@ -1395,7 +1396,8 @@ int bdb_temp_table_truncate(bdb_state_type *bdb_state, struct temp_table *tbl,
{
if (tbl == NULL)
return 0;
int rc = 0, ii = 0;
int rc = 0;
unsigned long long int ii = 0;
arr_elem_t *elem;

switch (tbl->temp_table_type) {
Expand Down Expand Up @@ -1561,7 +1563,8 @@ int bdb_temp_table_destroy_lru(struct temp_table *tbl,
int *bdberr)
{
DB_MPOOL_STAT *tmp;
int rc, ii;
int rc;
unsigned long long ii;
arr_elem_t *elem;

rc = 0;
Expand Down

0 comments on commit 8c91661

Please sign in to comment.