aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-01-16 20:29:02 -0500
committerJohn Thacker <johnthacker@gmail.com>2023-01-16 20:34:19 -0500
commitc8f8bc82a7c98e7791e5375c65412f75c5d9e873 (patch)
treea65d514b422965a9b7cb61acb22ce25f60d0c239 /epan/proto.c
parent30ef9d38cdff902bce27df4b4a235f94549498ce (diff)
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.
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 6ee37cea08..3487e98885 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -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");