diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2017-05-16 22:15:46 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2017-05-18 17:33:26 +0000 |
commit | f0086f83e35bea6e8501eaaf9008c19e40ab9104 (patch) | |
tree | 682b1a5734c1d43be81220f7bc3dedbf201469aa | |
parent | ebb0d87ffd00510d7c034477383115641d7e2390 (diff) | |
download | wireshark-f0086f83e35bea6e8501eaaf9008c19e40ab9104.tar.gz |
odb-ii: Fix Dereference of null pointer found by Clang analyzer
Change-Id: Ic19a59efffba1f19d3469445e8733fce8ab4cf98
Reviewed-on: https://code.wireshark.org/review/21689
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | epan/dissectors/packet-obd-ii.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-obd-ii.c b/epan/dissectors/packet-obd-ii.c index 3618fb0135..ef3eab9f49 100644 --- a/epan/dissectors/packet-obd-ii.c +++ b/epan/dissectors/packet-obd-ii.c @@ -1250,7 +1250,7 @@ dissect_obdii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) guint8 mode; /* validate */ - if (!can_id && !(can_id->id == ODBII_CAN_QUERY_ID || (can_id->id >= ODBII_CAN_RESPONSE_ID_MIN && can_id->id <= ODBII_CAN_RESPONSE_ID_MAX))) + if (!can_id || !(can_id->id == ODBII_CAN_QUERY_ID || (can_id->id >= ODBII_CAN_RESPONSE_ID_MIN && can_id->id <= ODBII_CAN_RESPONSE_ID_MAX))) return 0; if (tvb_reported_length(tvb) != 8) |