epan: FT_FRAMENUM strings are special

When creating the text of a custom column, don't call hf_try_val_to_str,
etc. on FT_FRAMENUM fields that have hfinfo->strings.
It refers to the ft_framenum_type.

Prevents crashing on custom columns of FT_FRAMENUM fields of
a type different than FT_FRAMENUM_NONE.
This commit is contained in:
John Thacker 2023-01-16 20:29:02 -05:00
parent 30ef9d38cd
commit c8f8bc82a7
1 changed files with 1 additions and 1 deletions

View File

@ -6834,7 +6834,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence,
if (offset_e && (offset_e < (size - 1)))
expr[offset_e++] = ',';
if (hfinfo->strings && FIELD_DISPLAY(hfinfo->display) == BASE_NONE && (IS_FT_INT(hfinfo->type) || IS_FT_UINT(hfinfo->type))) {
if (hfinfo->strings && hfinfo->type != FT_FRAMENUM && FIELD_DISPLAY(hfinfo->display) == BASE_NONE && (IS_FT_INT(hfinfo->type) || IS_FT_UINT(hfinfo->type))) {
/* Integer types with BASE_NONE never get the numeric value. */
if (IS_FT_INT32(hfinfo->type)) {
hf_str_val = hf_try_val_to_str_const(fvalue_get_sinteger(&finfo->value), hfinfo, "Unknown");