From 4a9e0e6034a17604c50ed5483f1d4c2067cab5bd Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 16 Apr 2008 22:42:49 +0200 Subject: [PATCH] libsmbconf: fix segfault in listing share names / config. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Discovered by Günther while giving a talk. - Sorry Günther! Michael (This used to be commit 518f4d4e6662138a2e71acc2296acedefc7c739a) --- source3/lib/smbconf/smbconf_reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c index 39b05f7016e..930999cc3fc 100644 --- a/source3/lib/smbconf/smbconf_reg.c +++ b/source3/lib/smbconf/smbconf_reg.c @@ -784,7 +784,7 @@ static WERROR smbconf_reg_get_share_names(struct smbconf_ctx *ctx, /* make sure "global" is always listed first */ if (smbconf_share_exists(ctx, GLOBAL_NAME)) { werr = smbconf_add_string_to_array(tmp_ctx, &tmp_share_names, - 1, GLOBAL_NAME); + added_count, GLOBAL_NAME); if (!W_ERROR_IS_OK(werr)) { goto done; } -- 2.11.4.GIT