jaideeppyne commented on PR #224:
URL: 
https://github.com/apache/datasketches-rust/pull/224#issuecomment-5412690548

   Good question — I found it by fuzzing the deserialize paths with truncated 
and bit-flipped headers (wrapped in `catch_unwind`) to check that every sketch 
returns `Err` on corrupt bytes rather than panicking. Frequencies was the one 
that slipped through: `lg_max_map_size` feeds straight into `1 << lg_max` in 
`with_lg_map_sizes` before any range check, so it overflows the shift on the 
empty-sketch path before any payload is read. Not from a production incident — 
just hardening the parse surface. FWIW the CPC deserialize path also panics on 
some malformed input; I can send a separate follow-up for that once this one 
lands.
   


-- 
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