diff options
author | Roland Knall <rknall@gmail.com> | 2015-06-02 23:17:27 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-06-03 11:46:01 +0000 |
commit | 53f3d7caaddb64d6a317a6b4c410340265912f42 (patch) | |
tree | a4ef7ff737503a539f95a2c697facf7120abd280 | |
parent | 360a7ec9ae0d921cdaa041fd02d4cb44b4d95dbb (diff) |
openSAFETY: Fix false-positive
- The starting offset for a consecutive frame search was off by 1
Change-Id: Ife77f9823e7e6d9a6601dba9c4cca74984e4ed40
Reviewed-on: https://code.wireshark.org/review/8741
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/dissectors/packet-opensafety.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c index 3fc86782b2..46557aad55 100644 --- a/epan/dissectors/packet-opensafety.c +++ b/epan/dissectors/packet-opensafety.c @@ -2120,7 +2120,10 @@ opensafety_package_dissector(const gchar *protocolName, const gchar *sub_diss_ha else break; - frameOffset += frameLength; + /* findSafetyFrame starts at frameOffset with the search for the next position. But the + * offset is assumed to be the ID, which can lead to scenarios, where the CRC of a previous + * detected frame is assumed to be the addr of the next one. +1 prevents such a scenario */ + frameOffset += (frameLength + 1); } if ( handled == TRUE ) |