Merge pull request #1922 from SparkiDev/tls_pad_fix

Fix for checking of TLS padding when padding byte value > msg len
pull/1924/head
toddouska 2018-11-12 13:20:35 -08:00 committed by GitHub
commit 8689cc6a04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -12417,8 +12417,8 @@ static byte MaskMac(const byte* data, int sz, int macSz, byte* expMac)
unsigned char started, notEnded;
unsigned char good = 0;
if (scanStart < 0)
scanStart = 0;
scanStart &= (~scanStart) >> (sizeof(int) * 8 - 1);
macStart &= (~macStart) >> (sizeof(int) * 8 - 1);
/* Div on Intel has different speeds depending on value.
* Use a bitwise AND or mod a specific value (converted to mul). */