forked from osmocom/wireshark
From Jim Young:
Wireshark crash with new packet list if unknown custom column field. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4379 svn path=/trunk/; revision=31485
This commit is contained in:
parent
0d26e8ad2d
commit
12479a1376
|
@ -464,12 +464,18 @@ create_view_and_model(void)
|
|||
NULL);
|
||||
if (cfile.cinfo.col_fmt[i] == COL_CUSTOM) {
|
||||
hfi = proto_registrar_get_byname(cfile.cinfo.col_custom_field[i]);
|
||||
if (hfi->parent != -1) {
|
||||
/* Prefix with protocol name */
|
||||
tooltip_text = g_strdup_printf("%s\n%s (%s)", proto_get_protocol_name(hfi->parent), hfi->name, hfi->abbrev);
|
||||
} else {
|
||||
tooltip_text = g_strdup_printf("%s (%s)", hfi->name, hfi->abbrev);
|
||||
}
|
||||
/* Check if this is a valid custom_field */
|
||||
if (hfi != NULL) {
|
||||
if (hfi->parent != -1) {
|
||||
/* Prefix with protocol name */
|
||||
tooltip_text = g_strdup_printf("%s\n%s (%s)", proto_get_protocol_name(hfi->parent), hfi->name, hfi->abbrev);
|
||||
} else {
|
||||
tooltip_text = g_strdup_printf("%s (%s)", hfi->name, hfi->abbrev);
|
||||
}
|
||||
} else {
|
||||
/* XXX - include custom_field value? e.g. "Unknown Custom (foo.bar)" */
|
||||
tooltip_text = g_strdup_printf("Unknown Custom Column Field");
|
||||
}
|
||||
} else {
|
||||
tooltip_text = g_strdup(col_format_desc(cfile.cinfo.col_fmt[i]));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue