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.py: 100-char filenames are truncated #44160

Closed
gustaebel mannequin opened this issue Oct 24, 2006 · 2 comments
Closed

tarfile.py: 100-char filenames are truncated #44160

gustaebel mannequin opened this issue Oct 24, 2006 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@gustaebel
Copy link
Mannequin

gustaebel mannequin commented Oct 24, 2006

BPO 1583506
Nosy @birkenfeld, @gustaebel
Files
  • 100chars.diff: fix and testcase
  • 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 2006-10-24.16:54:41.000>
    created_at = <Date 2006-10-24.11:21:29.000>
    labels = ['library']
    title = 'tarfile.py: 100-char filenames are truncated'
    updated_at = <Date 2006-10-24.16:54:41.000>
    user = 'https://github.com/gustaebel'

    bugs.python.org fields:

    activity = <Date 2006-10-24.16:54:41.000>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2006-10-24.11:21:29.000>
    creator = 'lars.gustaebel'
    dependencies = []
    files = ['7589']
    hgrepos = []
    issue_num = 1583506
    keywords = ['patch']
    message_count = 2.0
    messages = ['51279', '51280']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'lars.gustaebel']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1583506'
    versions = ['Python 2.6']

    @gustaebel
    Copy link
    Mannequin Author

    gustaebel mannequin commented Oct 24, 2006

    Patch bpo-1484695 applied with rev 45954 introduced an
    error in the creation of string header fields. The
    stn() function used to zero-pad strings assumes that a
    string to be put in an N character field, can be at
    most N-1 chars long plus a '\0' char. This is wrong. An
    N char field can store a N char string, the '\0' is
    left out in this case.
    The worst effect of this bug is that filenames that are
    exactly 100 chars long will be silently truncated to 99
    chars. Python 2.5 and 2.6 are affected.

    Attached patch fixes the stn() function and adds a
    testcase to test_tarfile.py.

    @gustaebel gustaebel mannequin closed this as completed Oct 24, 2006
    @gustaebel gustaebel mannequin added stdlib Python modules in the Lib dir labels Oct 24, 2006
    @birkenfeld
    Copy link
    Member

    Logged In: YES
    user_id=849994

    Applied in rev. 52431, 52432 (2.5).

    @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
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant