diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2018-01-29 19:44:07 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2018-01-30 00:42:10 +0000 |
commit | 42322ac8cf2d99cb15d60a8d6d4053b19f6b60a5 (patch) | |
tree | e4c18910ea01f2bc4be2329b2b1cdb4aec840c60 /wiretap | |
parent | 8342e5f97b7564ec423507453f7b5e4e5f48fffe (diff) |
dct2000 wiretap: expect all lines to have exactly 4 subsecond digits.
Should fix clang warning created by https://code.wireshark.org/review/#/c/25492.
Change-Id: Iafa31e24cd786a510f3a953d615df4cbc3930fa6
Reviewed-on: https://code.wireshark.org/review/25508
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/catapult_dct2000.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c index c3e7dc63ac..3e609daf25 100644 --- a/wiretap/catapult_dct2000.c +++ b/wiretap/catapult_dct2000.c @@ -1214,8 +1214,8 @@ parse_line(gchar *linebuff, gint line_length, } subsecond_decimals_buff[subsecond_decimals_chars] = linebuff[n]; } - if (subsecond_decimals_chars > MAX_SUBSECOND_DECIMALS || n >= line_length) { - /* More numbers than expected - give up */ + if (subsecond_decimals_chars != MAX_SUBSECOND_DECIMALS || n >= line_length) { + /* There should be exactly 4 subsecond digits - give up if not */ return FALSE; } /* Convert found value into microseconds */ |