forked from osmocom/wireshark
Set the size of the packet counts array when we create it.
g_array_sized_new() sets the amount of *space allocated for* the array, but doesn't actually set its *length*. Change-Id: Ia7deab34c758c88910dfb0e246a6903301e68029 Reviewed-on: https://code.wireshark.org/review/15806 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
3ba7798cb1
commit
1438d28768
|
@ -1107,6 +1107,7 @@ process_cap_file(wtap *wth, const char *filename)
|
|||
|
||||
cf_info.num_interfaces = idb_info->interface_data->len;
|
||||
cf_info.interface_packet_counts = g_array_sized_new(FALSE, TRUE, sizeof(guint32), cf_info.num_interfaces);
|
||||
g_array_set_size(cf_info.interface_packet_counts, cf_info.num_interfaces);
|
||||
cf_info.pkt_interface_id_unknown = 0;
|
||||
|
||||
g_free(idb_info);
|
||||
|
|
Loading…
Reference in New Issue