summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-h265.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:18 +0000
commit1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f (patch)
tree9930fb4bb87cd6037f60efff9656f967121c8c2d /epan/dissectors/packet-h265.c
parentAdding debian version 4.2.2-1.1. (diff)
downloadwireshark-1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f.tar.xz
wireshark-1da76b3706a6c9bd41bf8f219d7c97de5e1e5c7f.zip
Merging upstream version 4.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-h265.c')
-rw-r--r--epan/dissectors/packet-h265.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/epan/dissectors/packet-h265.c b/epan/dissectors/packet-h265.c
index eb71ca59..cd0a0481 100644
--- a/epan/dissectors/packet-h265.c
+++ b/epan/dissectors/packet-h265.c
@@ -801,18 +801,21 @@ dissect_h265_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, pack
start_offset = *start_bit_offset >> 3;
- if (hf_index > -1)
+ if (hf_index > -1) {
hf_field = proto_registrar_get_nth(hf_index);
+ }
- /* Allow only gint32 for se(v), guint32 for others. */
- switch (descriptor) {
- case H265_SE_V:
- DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_INT32);
- break;
+ if (hf_field) {
+ /* Allow only gint32 for se(v), guint32 for others. */
+ switch (descriptor) {
+ case H265_SE_V:
+ DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_INT32);
+ break;
- default:
- DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_UINT32);
- break;
+ default:
+ DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_UINT32);
+ break;
+ }
}
bit_offset = *start_bit_offset;