aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-05-20 23:08:08 -0400
committerJohn Thacker <johnthacker@gmail.com>2023-05-21 12:31:50 +0000
commitc4f37d77b29ec6a9754795d0efb6f68d633728d9 (patch)
tree32114d48ee2fa631c4b3791767fb3537da8009c1
parentde347765f57067fbd768d9faa6b5e5d13af2873e (diff)
synphasor: Use val_to_str_const
Don't use a value from packet data to directly index a value_string, particularly when the value string doesn't cover all possible values. Fix #19087
-rw-r--r--epan/dissectors/packet-synphasor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c
index 536847f750..fdc9e282b3 100644
--- a/epan/dissectors/packet-synphasor.c
+++ b/epan/dissectors/packet-synphasor.c
@@ -1211,7 +1211,7 @@ static gint dissect_PHSCALE(tvbuff_t *tvb, proto_tree *tree, gint offset, gint c
data_flag_tree = proto_tree_add_subtree_format(single_phasor_scaling_and_flags_tree, tvb, offset, 4,
ett_conf_phflags, NULL, "Phasor Data flags: %s",
- conf_phasor_type[tvb_get_guint8(tvb, offset + 2)].strptr);
+ val_to_str_const(tvb_get_guint8(tvb, offset + 2), conf_phasor_type, "Unknown"));
/* first and second bytes - phasor modification flags*/
phasor_flag1_tree = proto_tree_add_subtree_format(data_flag_tree, tvb, offset, 2, ett_conf_phmod_flags,