You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New changeset 33672c0 by Miss Islington (bot) in branch '3.8': bpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240) 33672c0
New changeset 51b36ed by Miss Islington (bot) in branch '3.9': bpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240) 51b36ed
Activity
stratakis commentedon Jun 30, 2020
GCC added a static analysis tool recently [0].
Running it under for CPython code base produces some interesting results.
Reproducer: ./configure --with-pydebug && CFLAGS='-fanalyzer' make
Attaching the log.
[0] https://developers.redhat.com/blog/2020/03/26/static-analysis-in-gcc-10/
stratakis commentedon Jun 30, 2020
First issue in Objects/bytearrayobject.c [0].
warning: use of NULL ‘<unknown>’ where non-null expected [CWE-690] [-Wanalyzer-null-argument]
277 | memcpy(result->ob_bytes, va.buf, va.len);
[0] https://github.com/python/cpython/blob/master/Objects/bytearrayobject.c#L277
vstinner commentedon Jul 8, 2020
New changeset 61fc23c by stratakis in branch 'master':
bpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240)
61fc23c
miss-islington commentedon Jul 10, 2020
New changeset 33672c0 by Miss Islington (bot) in branch '3.8':
bpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240)
33672c0
miss-islington commentedon Jul 10, 2020
New changeset 51b36ed by Miss Islington (bot) in branch '3.9':
bpo-41175: Guard against a NULL pointer dereference within bytearrayobject (GH-21240)
51b36ed
furkanonder commentedon May 12, 2023
@vstinner The issue seems to be solved. Can we close it?