Skip to content

Commit

Permalink
Fix:core:Fix read after free in traffic_message_restore_segments (#1114)
Browse files Browse the repository at this point in the history
Signed-off-by: mvglasow <michael -at- vonglasow.com>

Co-authored-by: mvglasow <michael -at- vonglasow.com>
  • Loading branch information
mvglasow committed Apr 24, 2021
1 parent 89f4cf5 commit 6667a64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion navit/traffic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3689,11 +3689,11 @@ static int traffic_message_restore_segments(struct traffic_message * this_, stru
pitem = (struct parsed_item *) curr_item->data;
item = tm_add_item(map, pitem->type, pitem->id_hi, pitem->id_lo, pitem->flags, pitem->attrs,
pitem->coords, pitem->coord_count, this_->id);
parsed_item_destroy(pitem);
tm_item_add_message_data(item, this_->id,
traffic_get_item_speed(item, seg_data, maxspeed),
traffic_get_item_delay(seg_data->delay, pitem->length, loc_len),
NULL, route);
parsed_item_destroy(pitem);
this_->priv->items[i] = item;
i++;
}
Expand Down

0 comments on commit 6667a64

Please sign in to comment.