classification
Title: ctypes _build_callargs() doesn't check name for NULL
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.4, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, haypo, python-dev
Priority: normal Keywords: patch

Created on 2013-07-26 14:56 by christian.heimes, last changed 2013-07-26 22:25 by christian.heimes. This issue is now closed.

Files
File name Uploaded Description Edit
issue18561.patch haypo, 2013-07-26 20:59 review
Messages (4)
msg193731 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-26 14:55
http://hg.python.org/cpython/file/40bec72df2a1/Modules/_ctypes/_ctypes.c#l3565

3565        case PARAMFLAG_FIN:
3566            /* 'in' parameter.  Copy it from inargs. */
CID 486199 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
31. var_deref_model: Passing null pointer "name" to function "_get_arg(int *, PyObject *, PyObject *, PyObject *, PyObject *)", which dereferences it. [show details]
3567            ob =_get_arg(&inargs_index, name, defval, inargs, kwds);
msg193751 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2013-07-26 20:59
_get_arg() should skip not check keywords if name is NULL (which looks to be a valid case, since name is check at the end of the function).
msg193752 - (view) Author: Roundup Robot (python-dev) Date: 2013-07-26 21:04
New changeset 57457028dd7a by Christian Heimes in branch '3.3':
Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
http://hg.python.org/cpython/rev/57457028dd7a

New changeset d543829eda7d by Christian Heimes in branch 'default':
Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
http://hg.python.org/cpython/rev/d543829eda7d
msg193759 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-26 22:25
Thanks!
History
Date User Action Args
2013-07-26 22:25:26christian.heimessetstatus: open -> closed
resolution: fixed
messages: + msg193759

stage: needs patch -> resolved
2013-07-26 21:04:51python-devsetnosy: + python-dev
messages: + msg193752
2013-07-26 20:59:25hayposetfiles: + issue18561.patch

nosy: + haypo
messages: + msg193751

keywords: + patch
2013-07-26 14:56:00christian.heimescreate