-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integer overflow in skip(s::IOBuffer, typemax(Int64))
can cause seg fault
#53908
Comments
The culprit is an unsafe use of Line 240 in e9d25ca
|
I think there's some logic to handle overflows around Lines 262 to 264 in e9d25ca
seek Lines 274 to 277 in e9d25ca
|
I think some of the modular additions should be changed to saturating additions. |
Fixes #53908 by clamping before doing addition. This also fixes an issue with negative skips if `io.offset` isn't zero. I am assuming that `io.size+1` cannot overflow.
Here is a MWE:
This happens on nightly as well as 1.10.2, both installed using juliaup.
The text was updated successfully, but these errors were encountered: