You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cursor's vendored protobuf Reader.uint32() accepts an overflowing five-byte varint when its fifth terminating byte carries bits above the low four permitted bits. For example, 80 80 80 80 7f terminates at byte five and is silently returned as 0xf0000000, even though the encoded value exceeds 32 bits.
Minimal reproduction
Decode a uint32 protobuf field encoded as 08 80 80 80 80 7f. The current decoder returns a truncated value instead of rejecting the malformed field.
Expected behavior
The fifth byte of a terminating uint32 varint must be at most 0x0f; larger values must fail rather than silently wrap.
Proposed scope
Validate the fifth byte before applying the final shift and add a regression for both the largest valid five-byte value and the overflowing terminator.
I am claiming this parser-boundary defect. I verified no duplicate Issue or implementation PR, and will add valid-max plus overflowing-terminator regression coverage before opening a focused fix.
Activity
outlier27-cell commentedon Oct 11, 2026
I am claiming this parser-boundary defect. I verified no duplicate Issue or implementation PR, and will add valid-max plus overflowing-terminator regression coverage before opening a focused fix.