Skip to content

Commit 808d266

Browse files
committed
fix unchecked zero pointers in bake string map joining task, when zero pointers are legal
1 parent 22e6352 commit 808d266

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/raddbgi_from_pdb/raddbgi_from_pdb.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -3571,11 +3571,13 @@ internal TS_TASK_FUNCTION_DEF(p2r_bake_string_map_join_task__entry_point)
35713571
{
35723572
for(U64 slot_idx = in->slot_idx_range.min; slot_idx < in->slot_idx_range.max; slot_idx += 1)
35733573
{
3574-
if(in->dst_map->slots[slot_idx] == 0)
3574+
B32 src_slots_good = (in->src_maps[src_map_idx] != 0 && in->src_maps[src_map_idx]->slots != 0);
3575+
B32 dst_slot_is_zero = (in->dst_map->slots[slot_idx] == 0);
3576+
if(src_slots_good && dst_slot_is_zero)
35753577
{
35763578
in->dst_map->slots[slot_idx] = in->src_maps[src_map_idx]->slots[slot_idx];
35773579
}
3578-
else if(in->src_maps[src_map_idx]->slots[slot_idx] != 0)
3580+
else if(src_slots_good && in->src_maps[src_map_idx]->slots[slot_idx] != 0)
35793581
{
35803582
rdim_bake_string_chunk_list_concat_in_place(in->dst_map->slots[slot_idx], in->src_maps[src_map_idx]->slots[slot_idx]);
35813583
}

0 commit comments

Comments
 (0)