TCP: Fix Dereference of null pointer found by Clang analyzer

Change-Id: Ie103b7f673db54056ad9edb15adb7fb7678ac336
Reviewed-on: https://code.wireshark.org/review/14916
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
This commit is contained in:
Alexis La Goutte 2016-04-14 16:28:48 +02:00 committed by Jeff Morriss
parent 61ca43521b
commit 6308d57444
1 changed files with 3 additions and 0 deletions

View File

@ -3513,6 +3513,7 @@ mptcp_get_meta_from_token(struct tcp_analysis* tcpd, tcp_flow_t *tcp_flow, guint
}
tcp_flow->mptcp_subflow->meta = &mptcpd->meta_flow[assignedMetaId];
}
DISSECTOR_ASSERT(tcp_flow->mptcp_subflow->meta);
tcp_flow->mptcp_subflow->meta->token = token;
tcp_flow->mptcp_subflow->meta->static_flags |= MPTCP_META_HAS_TOKEN;
@ -3553,6 +3554,8 @@ get_or_create_mptcpd_from_key(struct tcp_analysis* tcpd, tcp_flow_t *fwd, guint6
mptcpd = mptcp_get_meta_from_token(tcpd, fwd, token);
DISSECTOR_ASSERT(fwd->mptcp_subflow->meta);
fwd->mptcp_subflow->meta->key = key;
fwd->mptcp_subflow->meta->static_flags |= MPTCP_META_HAS_KEY;
fwd->mptcp_subflow->meta->base_dsn = expected_idsn;