Skip to content

Conversation

@Fibonacci747
Copy link

@Fibonacci747 Fibonacci747 commented Nov 19, 2025

Replaced the unchecked left shift in LinePoly::deserialize (stwo_cairo_prover/crates/cairo-serialize/src/deserialize.rs) with checked_shl to prevent a runtime shift panic when log_size is oversized. The serializer guarantees valid log_size for well-formed inputs, but deserialization can receive malformed or adversarial data; this change keeps the existing panic-on-invalid policy while making the failure deterministic and explicit for invalid log_size without invoking an undefined shift.


This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant