mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-03-23 08:32:01 +03:00
Merge pull request #2216 from synqa/fix-ub-leftshift
Fix undefined behavior of left shift
This commit is contained in:
@ -4761,7 +4761,7 @@ static void MY_SHA0_Transform(MY_SHA0_CTX* ctx) {
|
|||||||
UCHAR* p = ctx->buf;
|
UCHAR* p = ctx->buf;
|
||||||
int t;
|
int t;
|
||||||
for(t = 0; t < 16; ++t) {
|
for(t = 0; t < 16; ++t) {
|
||||||
UINT tmp = *p++ << 24;
|
UINT tmp = (UINT)*p++ << 24;
|
||||||
tmp |= *p++ << 16;
|
tmp |= *p++ << 16;
|
||||||
tmp |= *p++ << 8;
|
tmp |= *p++ << 8;
|
||||||
tmp |= *p++;
|
tmp |= *p++;
|
||||||
|
|||||||
Reference in New Issue
Block a user