[RemoteMirror] Add bounds checking to BitMask operations.
[RemoteMirror] Add bounds checking to BitMask operations.

If we encounter any multi-paylaod enum descriptors with bad data, we can end up writing off the end of the bitmask allocation, causing heap corruption. Add range checks to let us fail gracefully instead.

rdar://91423283

benlangmuir/swift,glessard/swift,roambotics/swift,roambotics/swift,atrick/swift,atrick/swift,ahoppen/swift,ahoppen/swift,JGiola/swift,JGiola/swift,JGiola/swift,benlangmuir/swift,benlangmuir/swift,JGiola/swift,apple/swift,glessard/swift,glessard/swift,ahoppen/swift,ahoppen/swift,benlangmuir/swift,glessard/swift,JGiola/swift,apple/swift,apple/swift,atrick/swift,glessard/swift,atrick/swift,atrick/swift,roambotics/swift,ahoppen/swift,ahoppen/swift,JGiola/swift,roambotics/swift,roambotics/swift,apple/swift,apple/swift,benlangmuir/swift,glessard/swift,benlangmuir/swift,apple/swift,atrick/swift,roambotics/swift