GeoNW: Fix parsing of ecies_nistp256 public keys

When decoding a publickey of type ecies_nistp256, increment the offset
after decoding the SymAlgo. Otherwise, the value is parsed again as part
of the EccPoint.

Change-Id: Ic93ceda7f9e8e2a1ce0bc64332c5f9cfa46634d8
Reviewed-on: https://code.wireshark.org/review/37995
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Marios Makassikis 2020-07-30 12:51:51 +02:00 committed by Alexis La Goutte
parent d6ec8aa0f5
commit 5d0f0131eb
1 changed files with 1 additions and 0 deletions

View File

@ -1325,6 +1325,7 @@ dissect_sec_publickey(tvbuff_t *tvb, gint *offset, packet_info *pinfo, proto_tre
case ecies_nistp256:
// SymAlgo + EccPoint
proto_tree_add_item(part_tree, hf_sgeonw_symmetric_algorithm, tvb, *offset, 1, ENC_BIG_ENDIAN);
*offset += 1;
dissect_sec_eccpoint(tvb, offset, pinfo, part_tree, (PublicKeyAlgorithm) tmp_val);
break;
default: