summaryrefslogtreecommitdiff
path: root/ui/tap-sctp-analysis.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2014-03-01 11:13:08 -0800
committerGerald Combs <gerald@wireshark.org>2014-03-01 19:15:38 +0000
commit79ef36a5f0c8b856080196b0af6d82db595c36d5 (patch)
tree44282fdf23db19229497fef339a14f2860c5f7ca /ui/tap-sctp-analysis.c
parent0cb4b4e44ded39edde2d26f9669f416effeb856a (diff)
downloadwireshark-79ef36a5f0c8b856080196b0af6d82db595c36d5.tar.gz
Fix some scan-build warnings.
Fix a modeline while we're at it. Change-Id: Ief6d5edbe33456170059cfab4f436f0844de32a1 Reviewed-on: https://code.wireshark.org/review/440 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/tap-sctp-analysis.c')
-rw-r--r--ui/tap-sctp-analysis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/tap-sctp-analysis.c b/ui/tap-sctp-analysis.c
index a413fbbaac..d4ee71a15e 100644
--- a/ui/tap-sctp-analysis.c
+++ b/ui/tap-sctp-analysis.c
@@ -952,7 +952,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
if (datachunk || forwardchunk)
{
tsnumber = tvb_get_ntohl((sctp_info->tvb)[chunk_number], DATA_CHUNK_TSN_OFFSET);
- if (tsn->first_tsn == 0)
+ if (tsn && tsn->first_tsn == 0)
tsn->first_tsn = tsnumber;
if (datachunk)
{
@@ -1085,7 +1085,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
{
tsnumber = tvb_get_ntohl((sctp_info->tvb)[chunk_number], SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET);
length = tvb_get_ntohs(sctp_info->tvb[chunk_number], CHUNK_LENGTH_OFFSET);
- if (sack->first_tsn == 0)
+ if (sack && sack->first_tsn == 0)
sack->first_tsn = tsnumber;
t_s_n = (guint8 *)g_malloc(length);
tvb_memcpy(sctp_info->tvb[chunk_number], (guint8 *)(t_s_n),0, length);