Commit d9c1c08f authored by malenov's avatar malenov
Browse files

Fix re-allocation to avoid out-of-mem access (limit loop to max_num_indices)

parent 58afcaf4
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ ivas_error ind_list_realloc(

    /* move indices from the old list to the new list */
    i = 0;
    while ( hBstr->ind_list[i].nb_bits > 0 )
    while ( hBstr->ind_list[i].nb_bits > 0 && i < hBstr->max_num_indices )
    {
        new_ind_list[i].id = hBstr->ind_list[i].id;
        new_ind_list[i].value = hBstr->ind_list[i].value;