Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid arithmetic overflow warning(C6297) found by Visual studio

static analysis.
  • Loading branch information...
commit a164ef53f2c38f331d2b4df8d7ff98693c4584a1 1 parent 6523adb
@ggcueroad ggcueroad authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  libarchive/archive_ppmd7.c
View
2  libarchive/archive_ppmd7.c
@@ -990,7 +990,7 @@ static void RangeEnc_ShiftLow(CPpmd7z_RangeEnc *p)
p->Cache = (Byte)((UInt32)p->Low >> 24);
}
p->CacheSize++;
- p->Low = (UInt32)p->Low << 8;
+ p->Low = ((UInt32)p->Low << 8) & 0xFFFFFFFF;
}
static void RangeEnc_Encode(CPpmd7z_RangeEnc *p, UInt32 start, UInt32 size, UInt32 total)
Please sign in to comment.
Something went wrong with that request. Please try again.