Bug 8946 - crash due to invalid pointer in source4/auth/gensec/pygensec.
crash due to invalid pointer in source4/auth/gensec/pygensec.
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Python
4.0 alpha 18
All All
: P5 normal
: ---
Assigned To: Jelmer Vernooij
samba4-qa@samba.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-17 15:14 UTC by Wolfgang Sourdeau
Modified: 2012-05-18 14:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Sourdeau 2012-05-17 15:14:09 UTC
In source4/auth/gensec/pygensec.c:py_gensec_start_client, we have this:

if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", discard_const_p(char *, kwnames), &py_settings))

where py_settings is optional and therefore should be initialized to NULL. The latter issue causes a crash in settings_from_object during the "if (!PyDict_Check(object))" check because "object", alias "pysettings", is an invalid pointer.