diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-05-11 02:06:22 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2011-05-11 02:06:22 +0000 |
commit | 02835bc4c55faad55f876b6c476942d963cc56e6 (patch) | |
tree | 6431822dc5f35669077e502df6a160538c675967 /epan/dissectors/packet-ssl-utils.c | |
parent | 1c515d2af2f67952d48d9beda4862a1ce89f779e (diff) | |
download | wireshark-02835bc4c55faad55f876b6c476942d963cc56e6.tar.gz |
From Michael Chen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5863 :
5. A guaranteed null pointer access violation is fixed in packet-ssl-utils.c
when DTLS succeeded in dissecting its payload.
svn path=/trunk/; revision=37058
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index 794e3b710f..4489ba6db6 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -3098,13 +3098,15 @@ ssl_add_data_info(gint proto, packet_info *pinfo, guchar* data, gint data_len, g rec->plain_data.data = (guchar*)(rec + 1); memcpy(rec->plain_data.data, data, data_len); rec->plain_data.data_len = data_len; - rec->seq = flow->byte_seq; - rec->nxtseq = flow->byte_seq + data_len; - rec->flow = flow; + if (flow) + { + rec->seq = flow->byte_seq; + rec->nxtseq = flow->byte_seq + data_len; + rec->flow = flow; + flow->byte_seq += data_len; + } rec->next = NULL; - flow->byte_seq += data_len; - /* insertion */ prec = &pi->appl_data; while (*prec) prec = &(*prec)->next; |