ChargePoint / wireshark-v2g

Dissector for the V2G Protocols
Other
45 stars 19 forks source link

dissector/v2gexi: handshake will sometimes include the nil char #19

Closed chardin-cpi closed 2 years ago

chardin-cpi commented 2 years ago

Some EVs are encoding the full string will nil at the end and some are not. So, to handle the prefix case in this pattern just make sure the string is long enough to compare but is doesn't need to be exact. This should up when the CharactersLen was 26 instead of the expected 25 and the last char was a '\0'.

[0] = u(75)
[1] = r(72)
[2] = n(6e)
[3] = :(3a)
[4] = d(64)
[5] = i(69)
[6] = n(6e)
[7] = :(3a)
[8] = 7(37)
[9] = 0(30)
[10] = 1(31)
[11] = 2(32)
[12] = 1(31)
[13] = :(3a)
[14] = 2(32)
[15] = 0(30)
[16] = 1(31)
[17] = 2(32)
[18] = :(3a)
[19] = M(4d)
[20] = s(73)
[21] = g(67)
[22] = D(44)
[23] = e(65)
[24] = f(66)
[25] = ^@(0)  <--- HERE

Signed-off-by: Charles Hardin charles.hardin@chargepoint.com