Skip to content
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

Bugs in binding parameters in sqlite3 #85828

Closed
serhiy-storchaka opened this issue Aug 29, 2020 · 4 comments
Closed

Bugs in binding parameters in sqlite3 #85828

serhiy-storchaka opened this issue Aug 29, 2020 · 4 comments
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 41662
Nosy @methane, @serhiy-storchaka, @miss-islington, @isidentical
PRs
  • bpo-41662: Fix bugs in binding parameters in sqlite3 #21998
  • [3.9] bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998) #22289
  • [3.8] bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998) #22290
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-09-17.08:51:18.829>
    created_at = <Date 2020-08-29.13:05:08.813>
    labels = ['extension-modules', 'type-bug', '3.8', '3.9', '3.10']
    title = 'Bugs in binding parameters in sqlite3'
    updated_at = <Date 2020-10-26.05:46:15.755>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2020-10-26.05:46:15.755>
    actor = 'methane'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-09-17.08:51:18.829>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2020-08-29.13:05:08.813>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41662
    keywords = ['patch']
    message_count = 4.0
    messages = ['376062', '377038', '377042', '379641']
    nosy_count = 5.0
    nosy_names = ['ghaering', 'methane', 'serhiy.storchaka', 'miss-islington', 'BTaskaya']
    pr_nums = ['21998', '22289', '22290']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue41662'
    versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

    @serhiy-storchaka
    Copy link
    Member Author

    There are few bugs in the code for binding parameters specified in the sqlite3 module:

    1. If argument "parameters" is a list, PyList_GET_ITEM() is called in a loop, but the size of the list is read only once before loop. Since the list can be changed during iteration, it can cause reading past the end of the list.

    2. If argument "parameters" is a custom sequence, all exceptions raised in __len__() (including KeybordInterrupt) are overridden by a ProgrammingError.

    @serhiy-storchaka serhiy-storchaka added 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error labels Aug 29, 2020
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 0b419b7 by Serhiy Storchaka in branch 'master':
    bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)
    0b419b7

    @miss-islington
    Copy link
    Contributor

    New changeset f76a388 by Miss Islington (bot) in branch '3.9':
    bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)
    f76a388

    @methane
    Copy link
    Member

    methane commented Oct 26, 2020

    New changeset a053a7e by Miss Skeleton (bot) in branch '3.8':
    bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)
    a053a7e

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes 3.9 only security fixes 3.10 only security fixes extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants