[issue22605] memcpy(NULL, NULL, 0) in

2014-10-10 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- components: Library (Lib) nosy: jwilk priority: normal severity: normal status: open title: memcpy(NULL, NULL, 0) in versions: Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue22605] memcpy(NULL, NULL, 0) in array_new()

2014-10-10 Thread Jakub Wilk
Jakub Wilk added the comment: The attached patch should fix the bug. -- keywords: +patch Added file: http://bugs.python.org/file36871/229023.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22605

[issue22605] memcpy(NULL, NULL, 0) in array_new()

2014-10-10 Thread Jakub Wilk
New submission from Jakub Wilk: 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

[issue22605] memcpy(NULL, NULL, 0) in array_new()

2014-10-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4563fff4e099 by Benjamin Peterson in branch '3.4': prevent passing NULL to memcpy (closes #22605) https://hg.python.org/cpython/rev/4563fff4e099 New changeset 8165e44594c2 by Benjamin Peterson in branch 'default': merge 3.4 (closes #22605)