diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-06-12 16:02:32 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-06-12 23:05:01 +0000 |
commit | 69ad89caa96f004513f5191b1f49c513a21f1a7b (patch) | |
tree | f8714769195f371a681ff6b5bd2edd9d0d566688 /epan/crypt | |
parent | 0cc092d4b13b1dc890e44100a691bd309dc24261 (diff) |
Make sure *both* sides are unsigned.
Change-Id: Id25ea93aee888eda665f52da4c00d75970ee69e8
Reviewed-on: https://code.wireshark.org/review/28253
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/crypt')
-rw-r--r-- | epan/crypt/dot11decrypt.c | 2 | ||||
-rw-r--r-- | epan/crypt/dot11decrypt_system.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/epan/crypt/dot11decrypt.c b/epan/crypt/dot11decrypt.c index 979cb05265..8942dbfcfc 100644 --- a/epan/crypt/dot11decrypt.c +++ b/epan/crypt/dot11decrypt.c @@ -1486,7 +1486,7 @@ Dot11DecryptRsna4WHandshake( /* verify the MIC (compare the MIC in the packet included in this message with a MIC calculated with the PTK) */ eapol_len=pntoh16(data+offset-3)+4; - if (tot_len-((guint)(offset-5)) < (eapol_len<DOT11DECRYPT_EAPOL_MAX_LEN?eapol_len:DOT11DECRYPT_EAPOL_MAX_LEN)) { + if ((guint)(tot_len-(offset-5)) < (eapol_len<DOT11DECRYPT_EAPOL_MAX_LEN?eapol_len:DOT11DECRYPT_EAPOL_MAX_LEN)) { DOT11DECRYPT_DEBUG_PRINT_LINE("Dot11DecryptRsna4WHandshake", "Too short to contain ANonce", DOT11DECRYPT_DEBUG_LEVEL_5); return DOT11DECRYPT_RET_NO_VALID_HANDSHAKE; } diff --git a/epan/crypt/dot11decrypt_system.h b/epan/crypt/dot11decrypt_system.h index bb0077219f..bca4e58565 100644 --- a/epan/crypt/dot11decrypt_system.h +++ b/epan/crypt/dot11decrypt_system.h @@ -45,7 +45,7 @@ #define DOT11DECRYPT_MAC_LEN 6 #define DOT11DECRYPT_RADIOTAP_HEADER_LEN 24 -#define DOT11DECRYPT_EAPOL_MAX_LEN 1024 +#define DOT11DECRYPT_EAPOL_MAX_LEN 1024U #define DOT11DECRYPT_TK_LEN 16 |