This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Integer overflow in sqlite module
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: ghaering, mark.dickinson, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-01-29 17:01 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sqlite_int_overflow-2.7.patch serhiy.storchaka, 2013-01-29 17:06 review
sqlite_int_overflow-3.2.patch serhiy.storchaka, 2013-01-29 17:06 review
sqlite_int_overflow-3.3.patch serhiy.storchaka, 2013-01-29 17:06 review
sqlite_int_overflow_tests.patch serhiy.storchaka, 2013-02-05 15:49 review
Messages (4)
msg180915 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-01-29 17:01
The proposed patch fixes an integer overflow in such cases:

1. 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).

2. When a callable used in create_collation() returns an integer which doesn't fit into C int. Now all Python integers work.

3. When Python integer doesn't fit into SQLite INTEGER. Now overflow detected and an exception raised.

4. Now sqlite module built even when HAVE_LONG_LONG is not defined.
msg181448 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-02-05 15:49
Here are tests for some bugs.
msg181618 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-02-07 15:08
New changeset 649937bb8f1c by Serhiy Storchaka in branch '2.7':
Issue #17073: Fix some integer overflows in sqlite3 module.
http://hg.python.org/cpython/rev/649937bb8f1c

New changeset 55a89352e220 by Serhiy Storchaka in branch '3.2':
Issue #17073: Fix some integer overflows in sqlite3 module.
http://hg.python.org/cpython/rev/55a89352e220

New changeset c5fb8bc56def by Serhiy Storchaka in branch '3.3':
Issue #17073: Fix some integer overflows in sqlite3 module.
http://hg.python.org/cpython/rev/c5fb8bc56def

New changeset b8a6bc70fc08 by Serhiy Storchaka in branch 'default':
Issue #17073: Fix some integer overflows in sqlite3 module.
http://hg.python.org/cpython/rev/b8a6bc70fc08
msg187976 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-04-28 11:17
New changeset 44fe1f5b07e3 by Serhiy Storchaka in branch '2.7':
Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
http://hg.python.org/cpython/rev/44fe1f5b07e3
History
Date User Action Args
2022-04-11 14:57:41adminsetgithub: 61275
2013-04-28 11:17:57python-devsetmessages: + msg187976
2013-02-10 18:19:12mark.dickinsonsetnosy: + mark.dickinson
2013-02-07 15:09:15serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2013-02-07 15:08:27python-devsetnosy: + python-dev
messages: + msg181618
2013-02-05 15:49:53serhiy.storchakasetfiles: + sqlite_int_overflow_tests.patch
assignee: serhiy.storchaka
messages: + msg181448
2013-01-29 17:06:31serhiy.storchakasetfiles: + sqlite_int_overflow-2.7.patch, sqlite_int_overflow-3.2.patch, sqlite_int_overflow-3.3.patch
keywords: + patch
2013-01-29 17:01:48serhiy.storchakacreate