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
Go int and C int are not guaranteed to be the same size. But right now SetFileControlInt blindly casts an int to a C.int, which can overflow or underflow. This is partially responsible for the issue described in #1298. (Even if they were the same size, it still would have been wrong for that op code because SQLite always wants a 64-bit argument even on a 32-bit architecture.)
Fix SetFileControlInt to do explicit bounds checking before casting, and return an error if the number would overflow or underflow.
The text was updated successfully, but these errors were encountered:
Go
int
and Cint
are not guaranteed to be the same size. But right nowSetFileControlInt
blindly casts anint
to aC.int
, which can overflow or underflow. This is partially responsible for the issue described in #1298. (Even if they were the same size, it still would have been wrong for that op code because SQLite always wants a 64-bit argument even on a 32-bit architecture.)Fix
SetFileControlInt
to do explicit bounds checking before casting, and return an error if the number would overflow or underflow.The text was updated successfully, but these errors were encountered: