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

xdrlib.py: pack_fstring() did not use null bytes for padding #42407

Closed
dqsearchlores mannequin opened this issue Sep 23, 2005 · 2 comments
Closed

xdrlib.py: pack_fstring() did not use null bytes for padding #42407

dqsearchlores mannequin opened this issue Sep 23, 2005 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@dqsearchlores
Copy link
Mannequin

dqsearchlores mannequin commented Sep 23, 2005

BPO 1300515
Nosy @birkenfeld
Files
  • xdrlib_patch.diff: patch to xdrlib.py
  • 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 2005-09-29.20:49:38.000>
    created_at = <Date 2005-09-23.09:37:50.000>
    labels = ['library']
    title = 'xdrlib.py: pack_fstring() did not use null bytes for padding'
    updated_at = <Date 2005-09-29.20:49:38.000>
    user = 'https://bugs.python.org/dqsearchlores'

    bugs.python.org fields:

    activity = <Date 2005-09-29.20:49:38.000>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2005-09-23.09:37:50.000>
    creator = 'dq_searchlores'
    dependencies = []
    files = ['6794']
    hgrepos = []
    issue_num = 1300515
    keywords = ['patch']
    message_count = 2.0
    messages = ['48764', '48765']
    nosy_count = 2.0
    nosy_names = ['georg.brandl', 'dq_searchlores']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1300515'
    versions = ['Python 2.5']

    @dqsearchlores
    Copy link
    Mannequin Author

    dqsearchlores mannequin commented Sep 23, 2005

    According to the documentation, null shall be used as
    padding byte. But, as the test below shows, instead of
    null, additional trailing characters of the original
    string are used. This is also wrong according to the
    related RFC 1014 (and RFC 1832).

    This is tested on Python 2.4.1 (#65, Mar 30 2005,
    09:13:57) [MSC v.1310 32 bit (Intel)] on win32

    >>> import xdrlib
    >>> p = xdrlib.Packer()
    >>> p.pack_fstring(2,"abcdef")
    >>> p.get_buffer()
    'abcd'

    I am expecting 'ab\0\0'

    This change does not have any impact on unpack_fstring().

    The patch is done against the current CVS tree.
    The patch does not add nor change any functionality.

    @dqsearchlores dqsearchlores mannequin closed this as completed Sep 23, 2005
    @dqsearchlores dqsearchlores mannequin added the stdlib Python modules in the Lib dir label Sep 23, 2005
    @dqsearchlores dqsearchlores mannequin closed this as completed Sep 23, 2005
    @dqsearchlores dqsearchlores mannequin added the stdlib Python modules in the Lib dir label Sep 23, 2005
    @birkenfeld
    Copy link
    Member

    Logged In: YES
    user_id=1188172

    Thanks for the patch, committed in xdrlib.py r1.18, r1.16.4.1

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 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