The provided commit directly patches the function opj_j2k_add_tlmarker in src/lib/openjp2/j2k.c. The patch adds a bounds check (l_current_tile_part < cstr_index->tile_index[tileno].nb_tps) before accessing an array element (cstr_index->tile_index[tileno].tp_index[l_current_tile_part]). The absence of this check in the vulnerable version allowed for a heap buffer overflow when l_current_tile_part was greater than or equal to the number of tile-parts (nb_tps), leading to an out-of-bounds write. The vulnerability description aligns with this, stating a heap buffer overflow in the OpenJPEG project related to the opj_decompress utility, and this function is part of the JPEG 2000 decoding process.