diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-12-10 10:37:07 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-12-10 18:37:51 +0000 |
commit | 2dfa603333416aec69719fb074388886f0fc96b2 (patch) | |
tree | b60208a6ea6b279dd4f2cda562b35cbb93924818 | |
parent | 00223bc5b9f3c34a365759fceb49684b4496051a (diff) |
Initialize fd_head->frame in all cases where we allocate fd_head.
Also, sort the initializations of structure members by the order in the
structure, to make it easier to check that we've initialized them all.
Bug: 13231
Change-Id: Id2819940d916a5fd5a3f1bf2fc20bd3ee34a75f4
Reviewed-on: https://code.wireshark.org/review/19195
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | epan/reassemble.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/reassemble.c b/epan/reassemble.c index 62fb9519c0..d28f7f1293 100644 --- a/epan/reassemble.c +++ b/epan/reassemble.c @@ -2427,14 +2427,15 @@ fragment_start_seq_check(reassembly_table *table, const packet_info *pinfo, /* Create list-head. */ fd_head = g_slice_new(fragment_head); fd_head->next = NULL; - fd_head->datalen = tot_len; + fd_head->frame = 0; fd_head->offset = 0; - fd_head->fragment_nr_offset = 0; fd_head->len = 0; - fd_head->flags = FD_BLOCKSEQUENCE|FD_DATALEN_SET; - fd_head->tvb_data = NULL; + fd_head->fragment_nr_offset = 0; + fd_head->datalen = tot_len; fd_head->reassembled_in = 0; fd_head->reas_in_layer_num = 0; + fd_head->flags = FD_BLOCKSEQUENCE|FD_DATALEN_SET; + fd_head->tvb_data = NULL; fd_head->error = NULL; insert_fd_head(table, fd_head, pinfo, id, data); |