gty404 opened a new pull request, #1005:
URL: https://github.com/apache/iceberg-cpp/pull/1005

   ## Summary
   - \`RoaringPositionBitmap::Deserialize\` relied on \`Roaring::readSafe\`, 
which only bounds-checks the read and does not verify CRoaring's structural 
invariants. A crafted deletion vector (e.g. a bitset container with a wrong 
cardinality, or wrapping run containers) could later cause out-of-bounds access 
during merge (\`|=\`) or serialize (\`runOptimize\`).
   - Call \`roaring_bitmap_internal_validate\` right after \`readSafe\` and 
return \`InvalidArgument\` on failure. This is the only CRoaring 
deserialization site, so all read/merge paths are covered.
   
   ## Test plan
   - [x] Added \`TestDeserializeRejectsStructurallyInvalidBitmap\` (bitset 
container claiming cardinality 4097 with all 65536 bits set); verified it fails 
without the fix and passes with it.
   - [x] \`util_test\` RoaringPositionBitmap / PositionDelete tests and 
\`data_test\` pass.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to