Issue 17073: Integer overflow in sqlite module (original) (raw)
The proposed patch fixes an integer overflow in such cases:
When an authorizer callback (registered with set_authorizer()) returns an integer which doesn't fit into C int. Now integers out of C int range interpreted as SQLITE_DENY (as any non-integer values).
When a callable used in create_collation() returns an integer which doesn't fit into C int. Now all Python integers work.
When Python integer doesn't fit into SQLite INTEGER. Now overflow detected and an exception raised.
Now sqlite module built even when HAVE_LONG_LONG is not defined.