diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-02-05 15:24:19 -0800 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2018-02-06 07:19:19 +0000 |
commit | dcfc57486de36a0cbef9b102b24011230b62f5cb (patch) | |
tree | b0a3c79bb1db5e32f0003f0cd542949102239b6a | |
parent | ab202adb0ae95de3d63b7ba43a062133f38ee299 (diff) |
IPMI: Add NULL pointer checks.
Check for a valid data->curr_frame in ipmi_set_data and ipmi_get_data.
Bug: 14393
Change-Id: I615975015da864718dbd486d875aa3020db94edd
Reviewed-on: https://code.wireshark.org/review/25621
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
-rw-r--r-- | epan/dissectors/packet-ipmi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ipmi.c b/epan/dissectors/packet-ipmi.c index 913f4cb2c6..c209aaea23 100644 --- a/epan/dissectors/packet-ipmi.c +++ b/epan/dissectors/packet-ipmi.c @@ -792,7 +792,7 @@ void ipmi_set_data(packet_info *pinfo, guint idx, guint32 value) ipmi_packet_data_t * data = get_packet_data(pinfo); /* check bounds */ - if (data->curr_level >= MAX_NEST_LEVEL || idx >= NSAVED_DATA ) { + if (data->curr_level >= MAX_NEST_LEVEL || idx >= NSAVED_DATA || !data->curr_frame ) { return; } @@ -806,7 +806,7 @@ gboolean ipmi_get_data(packet_info *pinfo, guint idx, guint32 * value) ipmi_packet_data_t * data = get_packet_data(pinfo); /* check bounds */ - if (data->curr_level >= MAX_NEST_LEVEL || idx >= NSAVED_DATA ) { + if (data->curr_level >= MAX_NEST_LEVEL || idx >= NSAVED_DATA || !data->curr_frame ) { return FALSE; } |