diff options
author | Michael Mann <mmann78@netscape.net> | 2018-02-11 23:08:40 -0500 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-02-12 06:36:23 +0000 |
commit | 0bd863ae4696858b67b72bf1b0a32377877a5a38 (patch) | |
tree | 0fafd130731a6555724de7f77d69bc55c1646b12 /epan/dissectors/packet-ipmi-picmg.c | |
parent | ba3cfb403a403647241062b933ff82808ac62a59 (diff) |
packet-ipmi-picmg.c: Add NULL check in rq17.
Crafted packets may not have ipmi_header.
Bug: 14409
Change-Id: Ib6a8eceab13525c6c8dca5cef8bce3532dc50911
Reviewed-on: https://code.wireshark.org/review/25745
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ipmi-picmg.c')
-rw-r--r-- | epan/dissectors/packet-ipmi-picmg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ipmi-picmg.c b/epan/dissectors/packet-ipmi-picmg.c index e815afacd2..ddc1251e26 100644 --- a/epan/dissectors/packet-ipmi-picmg.c +++ b/epan/dissectors/packet-ipmi-picmg.c @@ -1205,8 +1205,12 @@ rq17(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { 0x02, "Notify" }, { 0, NULL } }; - guint to_shmm = ipmi_get_hdr(pinfo)->rs_sa == 0x20; guint cmd = tvb_get_guint8(tvb, 0); + const ipmi_header_t *header = ipmi_get_hdr(pinfo); + if (header == NULL) + return; + + guint to_shmm = header->rs_sa == 0x20; ipmi_set_data(pinfo, 0, (to_shmm << 8) | cmd); |