aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-02-28 12:07:55 -0800
committerGuy Harris <guy@alum.mit.edu>2018-02-28 20:08:41 +0000
commitea0b580b978834a4ce0ea8c29cf02da1a3512c0a (patch)
treee8482ec9f7694cd0834a56320540fb08fc5b32bb /epan/proto.c
parent03474c1303faeed68631e4074ba692bdc193323d (diff)
Fix a check.
Presumably the intent is to check for unsigned integer and signed integer types, not to check twice for unsigned integer types. Thanks and a tip of the Hatlo hat to Visual Studio Code Analyzer for finding this. Change-Id: Ie8e4d231af929ee8e626c5c9258c3356d5209f4f Reviewed-on: https://code.wireshark.org/review/26187 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 9fd07baa67..a1345d0066 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -2054,7 +2054,8 @@ test_length(header_field_info *hfinfo, tvbuff_t *tvb,
return;
if ((hfinfo->type == FT_STRINGZ) ||
- ((encoding & (ENC_VARINT_PROTOBUF|ENC_VARINT_QUIC)) && (IS_FT_UINT(hfinfo->type) || IS_FT_UINT(hfinfo->type)))) {
+ ((encoding & (ENC_VARINT_PROTOBUF|ENC_VARINT_QUIC)) &&
+ (IS_FT_UINT(hfinfo->type) || IS_FT_INT(hfinfo->type)))) {
/* If we're fetching until the end of the TVB, only validate
* that the offset is within range.
*/