aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-18 15:58:50 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-18 15:58:50 +0000
commit48d2267d2d05bf4acaa2ae4e00e3d9b600cce235 (patch)
treeb91e3d85242f15336883bd197abbe86cd66fdfc8 /res
parent99e420ecd8ad845f253266482101298583994c00 (diff)
Merged revisions 109447 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r109447 | twilson | 2008-03-18 10:43:34 -0500 (Tue, 18 Mar 2008) | 3 lines Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109459 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c2
-rw-r--r--res/res_config_ldap.c8
-rw-r--r--res/res_indications.c2
-rw-r--r--res/res_phoneprov.c2
-rw-r--r--res/res_realtime.c8
5 files changed, 11 insertions, 11 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 47bfeb077..59e79ce6f 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2721,7 +2721,7 @@ static char *handle_cli_agi_show(struct ast_cli_entry *e, int cmd, struct ast_cl
if (a->argc > e->args) {
command = find_command(a->argv + e->args, 1);
if (command) {
- ast_cli(a->fd, command->usage);
+ ast_cli(a->fd, "%s", command->usage);
ast_cli(a->fd, " Runs Dead : %s\n", command->dead ? "Yes" : "No");
} else {
if (find_command(a->argv + e->args, -1)) {
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index b76ad8ae7..028902adb 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -766,10 +766,10 @@ static struct ast_variable **realtime_ldap_base_ap(unsigned int *entries_count_p
ast_str_append(&filter, 0, "(&");
if (table_config && table_config->additional_filter)
- ast_str_append(&filter, 0, table_config->additional_filter);
+ ast_str_append(&filter, 0, "%s", table_config->additional_filter);
if (table_config != base_table_config && base_table_config &&
base_table_config->additional_filter) {
- ast_str_append(&filter, 0, base_table_config->additional_filter);
+ ast_str_append(&filter, 0, "%s", base_table_config->additional_filter);
}
/* Create the first part of the query using the first parameter/value pairs we just extracted */
@@ -1171,11 +1171,11 @@ static int update_ldap(const char *basedn, const char *table_name, const char *a
/* Create the filter with the table additional filter and the parameter/value pairs we were given */
ast_str_append(&filter, 0, "(&");
if (table_config && table_config->additional_filter) {
- ast_str_append(&filter, 0, table_config->additional_filter);
+ ast_str_append(&filter, 0, "%s", table_config->additional_filter);
}
if (table_config != base_table_config && base_table_config
&& base_table_config->additional_filter) {
- ast_str_append(&filter, 0, base_table_config->additional_filter);
+ ast_str_append(&filter, 0, "%s", base_table_config->additional_filter);
}
append_var_and_value_to_filter(&filter, table_config, attribute, lookup);
ast_str_append(&filter, 0, ")");
diff --git a/res/res_indications.c b/res/res_indications.c
index a957b7828..af56444cd 100644
--- a/res/res_indications.c
+++ b/res/res_indications.c
@@ -202,7 +202,7 @@ static char *handle_cli_indication_show(struct ast_cli_entry *e, int cmd, struct
if (tz->nrringcadence)
j--;
ast_copy_string(buf + j, "\n", sizeof(buf) - j);
- ast_cli(a->fd, buf);
+ ast_cli(a->fd, "%s", buf);
for (ts = tz->tones; ts; ts = ts->next)
ast_cli(a->fd, "%-7.7s %-15.15s %s\n", tz->country, ts->name, ts->data);
break;
diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c
index f7bcd5ab5..f5d785643 100644
--- a/res/res_phoneprov.c
+++ b/res/res_phoneprov.c
@@ -914,7 +914,7 @@ static int pp_each_user_exec(struct ast_channel *chan, const char *cmd, char *da
if (!ast_strlen_zero(args.exclude_mac) && !strcasecmp(user->macaddress, args.exclude_mac))
continue;
pbx_substitute_variables_varshead(user->headp, args.string, expand_buf, sizeof(expand_buf));
- ast_build_string(&buf, &len, expand_buf);
+ ast_build_string(&buf, &len, "%s", expand_buf);
}
AST_RWLIST_UNLOCK(&users);
diff --git a/res/res_realtime.c b/res/res_realtime.c
index 14ad28c40..297ecb5ba 100644
--- a/res/res_realtime.c
+++ b/res/res_realtime.c
@@ -42,7 +42,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static char *cli_realtime_load(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
- char *header_format = "%30s %-30s\n";
+#define CRL_HEADER_FORMAT "%30s %-30s\n"
struct ast_variable *var=NULL;
switch (cmd) {
@@ -64,10 +64,10 @@ static char *cli_realtime_load(struct ast_cli_entry *e, int cmd, struct ast_cli_
var = ast_load_realtime_all(a->argv[2], a->argv[3], a->argv[4], NULL);
if (var) {
- ast_cli(a->fd, header_format, "Column Name", "Column Value");
- ast_cli(a->fd, header_format, "--------------------", "--------------------");
+ ast_cli(a->fd, CRL_HEADER_FORMAT, "Column Name", "Column Value");
+ ast_cli(a->fd, CRL_HEADER_FORMAT, "--------------------", "--------------------");
while (var) {
- ast_cli(a->fd, header_format, var->name, var->value);
+ ast_cli(a->fd, CRL_HEADER_FORMAT, var->name, var->value);
var = var->next;
}
} else {