Bug 8946 - crash due to invalid pointer in source4/auth/gensec/pygensec.
Summary: crash due to invalid pointer in source4/auth/gensec/pygensec.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Python (show other bugs)
Version: 4.0 alpha 18
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jelmer Vernooij
QA Contact: samba4-qa@samba.org
URL:
Keywords:
Depends on:
Blocks:
 
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.