Page MenuHomeFreeBSD

Fix kvm bitmap index
Needs ReviewPublic

Authored by luporl on Fri, Sep 6, 5:43 PM.

Details

Reviewers
will
Summary

_kvm_bitmap_next may perform an out-of-bounds access on bm->map array.
It seems the right is to divide *idx by CHAR_BIT, instead of multiplying it.

Another thing that looks strange to me is the function returning when it finds a bit that is not set. Shouldn't it be the opposite?

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 26319
Build 24798: arc lint + arc unit

Event Timeline

luporl created this revision.Fri, Sep 6, 5:43 PM