mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
param: avoid dereferencing null lp_ctx
process_smbconf_service() calls lp_do_section() with a NULL userdata (struct loadparm_context *) argument. Since 0864d4945, lp_do_section() unconditionally attempts to set the lp_ctx->bInGlobalSection variable, resulting in a segfault. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Aug 11 21:00:15 CEST 2014 on sn-devel-104
This commit is contained in:
parent
9d5fba18ab
commit
b19283c0f4
@ -2584,7 +2584,9 @@ bool lp_do_section(const char *pszSectionName, void *userdata)
|
||||
|
||||
/* if we've just struck a global section, note the fact. */
|
||||
bInGlobalSection = isglobal;
|
||||
lp_ctx->bInGlobalSection = isglobal;
|
||||
if (lp_ctx != NULL) {
|
||||
lp_ctx->bInGlobalSection = isglobal;
|
||||
}
|
||||
|
||||
/* check for multiple global sections */
|
||||
if (bInGlobalSection) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user