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

tarfile.itn breaks if n is a negative float #76894

Closed
shin mannequin opened this issue Jan 29, 2018 · 2 comments
Closed

tarfile.itn breaks if n is a negative float #76894

shin mannequin opened this issue Jan 29, 2018 · 2 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@shin
Copy link
Mannequin

shin mannequin commented Jan 29, 2018

BPO 32713
Nosy @gustaebel, @miss-islington, @shin-
PRs
  • bpo-32713: Fix tarfile.itn for large/negative float values #5434
  • [3.7] bpo-32713: Fix tarfile.itn for large/negative float values. (GH-5434) #5917
  • [3.6] bpo-32713: Fix tarfile.itn for large/negative float values. (GH-5434) #5918
  • 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 2018-04-01.08:00:45.835>
    created_at = <Date 2018-01-29.21:15:56.876>
    labels = ['type-bug', 'library']
    title = 'tarfile.itn breaks if n is a negative float'
    updated_at = <Date 2018-04-01.08:00:45.834>
    user = 'https://github.com/shin'

    bugs.python.org fields:

    activity = <Date 2018-04-01.08:00:45.834>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-04-01.08:00:45.835>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2018-01-29.21:15:56.876>
    creator = 'j0ffrey'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32713
    keywords = ['patch']
    message_count = 2.0
    messages = ['311173', '312974']
    nosy_count = 3.0
    nosy_names = ['lars.gustaebel', 'miss-islington', 'j0ffrey']
    pr_nums = ['5434', '5917', '5918']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue32713'
    versions = ['Python 3.4', 'Python 3.5', 'Python 3.6']

    @shin
    Copy link
    Mannequin Author

    shin mannequin commented Jan 29, 2018

    Originally reported @ github.com/docker/compose/issues/5618

    It seems that tarfile.itn() attempts to execute bitwise operations on a float if the n argument is a negative float, raising a TypeError.

    As pointed out in the original report, this is an issue when converting some mtime values in TarInfo._create_header

    This also happens for positive floats > 8**11 - 1, but that one is less of an issue for the next two hundred years or so.

    @shin shin mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jan 29, 2018
    @miss-islington
    Copy link
    Contributor

    New changeset a9a8a98 by Miss Islington (bot) in branch '3.7':
    bpo-32713: Fix tarfile.itn for large/negative float values. (GH-5434)
    a9a8a98

    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants