We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
GitHub fields:
assignee = None closed_at = <Date 2014-10-11.00:58:50.265> created_at = <Date 2014-10-10.19:15:10.423> labels = ['library'] title = 'memcpy(NULL, NULL, 0) in array_new()' updated_at = <Date 2014-10-11.00:58:50.224> user = 'https://github.com/jwilk'
bugs.python.org fields:
activity = <Date 2014-10-11.00:58:50.224> actor = 'python-dev' assignee = 'none' closed = True closed_date = <Date 2014-10-11.00:58:50.265> closer = 'python-dev' components = ['Library (Lib)'] creation = <Date 2014-10-10.19:15:10.423> creator = 'jwilk' dependencies = [] files = ['36871'] hgrepos = [] issue_num = 22605 keywords = ['patch'] message_count = 3.0 messages = ['229023', '229024', '229054'] nosy_count = 2.0 nosy_names = ['jwilk', 'python-dev'] pr_nums = [] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue22605' versions = ['Python 3.5']
The text was updated successfully, but these errors were encountered:
If you initialize array with another empty array, then this code runs:
memcpy(self->ob_item, other->ob_item, len * other->ob_descr->itemsize);
But self->ob_item and other->ob_item are NULL in such case. Passing null pointer to memcpy() is undefined behavior even when length is 0.
Sorry, something went wrong.
The attached patch should fix the bug.
New changeset 4563fff4e099 by Benjamin Peterson in branch '3.4': prevent passing NULL to memcpy (closes bpo-22605) https://hg.python.org/cpython/rev/4563fff4e099
New changeset 8165e44594c2 by Benjamin Peterson in branch 'default': merge 3.4 (closes bpo-22605) https://hg.python.org/cpython/rev/8165e44594c2
No branches or pull requests
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: