frame, tcp: don't g_assert while in the middle of dissecting.

Use DISSECTOR_ASSERT calls instead, so that *shark doesn't crash, it
just puts a complaint into the protocol tree.
This commit is contained in:
Guy Harris 2021-03-20 00:50:07 -07:00
parent 6ffbbcefa3
commit 9f04392c0f
2 changed files with 2 additions and 2 deletions

View File

@ -386,7 +386,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
break;
default:
g_assert_not_reached();
DISSECTOR_ASSERT_NOT_REACHED();
break;
}

View File

@ -5960,7 +5960,7 @@ tcp_dissect_options(tvbuff_t *tvb, int offset, guint length, int eol,
nop_count = 0;
}
} else {
g_assert_not_reached();
DISSECTOR_ASSERT_NOT_REACHED();
}
field_item = proto_tree_add_item(opt_tree, local_proto, tvb, offset, 1, ENC_NA);