From b11f71eeae9e66648593c71a80eb8b2a034ac96c Mon Sep 17 00:00:00 2001 From: nbk Date: Tue, 13 Dec 2005 17:51:34 +0000 Subject: [PATCH] Pull from CVS head: Initialize allowed_chars before using sql_escape_func. --- src/modules/rlm_sqlcounter/rlm_sqlcounter.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/rlm_sqlcounter/rlm_sqlcounter.c b/src/modules/rlm_sqlcounter/rlm_sqlcounter.c index d330c43..4d2a50b 100644 --- a/src/modules/rlm_sqlcounter/rlm_sqlcounter.c +++ b/src/modules/rlm_sqlcounter/rlm_sqlcounter.c @@ -447,6 +447,12 @@ static int sqlcounter_instantiate(CONF_SECTION *conf, void **instance) } /* + * Safe characters list for sql queries. Everything else is + * replaced rwith their mime-encoded equivalents. + */ + allowed_chars = data->allowed_chars; + + /* * Discover the attribute number of the key. */ if (data->key_name == NULL) { @@ -543,12 +549,6 @@ static int sqlcounter_instantiate(CONF_SECTION *conf, void **instance) */ paircompare_register(data->dict_attr, 0, sqlcounter_cmp, data); - /* - * Safe characters list for sql queries. Everything else is - * replaced with their mime-encoded equivalents. - */ - allowed_chars = data->allowed_chars; - *instance = data; return 0; -- 2.1.4