]> sigrok.org Git - pulseview.git/commit
LogicSegment::pow2_ceil(): Fix potentіal integer overflow.
authorUwe Hermann <redacted>
Mon, 21 May 2018 14:30:57 +0000 (16:30 +0200)
committerUwe Hermann <redacted>
Mon, 21 May 2018 14:30:57 +0000 (16:30 +0200)
commit727083851e431c1a0303347550d5ace9ea6962d1
tree4457a6a37b74f34ea4aca1e04aa024625278e738
parent076ce70c06de8bb05a8e8970788ecfd73b63346d
LogicSegment::pow2_ceil(): Fix potentіal integer overflow.

Reported by Coverity (CID 50925):

  Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
    overflow_before_widen: Potentially overflowing expression 1 << power
    with type int (32 bits, signed) is evaluated using 32-bit arithmetic,
    and then used in a context that expects an expression of type
    uint64_t const (64 bits, unsigned).
pv/data/logicsegment.cpp