aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 5625b01c8..2213f8855 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -647,7 +647,7 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
} else if (!strcasecmp(var, "sayduration")){
ast_set2_flag(vmu, ast_true(value), VM_SAYDURATION);
} else if (!strcasecmp(var, "saydurationm")){
- if (sscanf(value, "%d", &x) == 1) {
+ if (sscanf(value, "%30d", &x) == 1) {
vmu->saydurationm = x;
} else {
ast_log(LOG_WARNING, "Invalid min duration for say duration\n");
@@ -672,7 +672,7 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
vmu->maxmsg = MAXMSGLIMIT;
}
} else if (!strcasecmp(var, "volgain")) {
- sscanf(value, "%lf", &vmu->volgain);
+ sscanf(value, "%30lf", &vmu->volgain);
} else if (!strcasecmp(var, "options")) {
apply_options(vmu, value);
}
@@ -2421,7 +2421,7 @@ static int last_message_index(struct ast_vm_user *vmu, char *dir)
ast_odbc_release_obj(obj);
goto yuck;
}
- if (sscanf(rowdata, "%d", &x) != 1)
+ if (sscanf(rowdata, "%30d", &x) != 1)
ast_log(LOG_WARNING, "Failed to read message count!\n");
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
@@ -2467,7 +2467,7 @@ static int message_exists(char *dir, int msgnum)
ast_odbc_release_obj(obj);
goto yuck;
}
- if (sscanf(rowdata, "%d", &x) != 1)
+ if (sscanf(rowdata, "%30d", &x) != 1)
ast_log(LOG_WARNING, "Failed to read message count!\n");
SQLFreeHandle (SQL_HANDLE_STMT, stmt);
ast_odbc_release_obj(obj);
@@ -3034,7 +3034,7 @@ static void prep_email_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu
pbx_builtin_setvar_helper(ast, "ORIG_VM_CIDNUM", origcidnum);
}
- if ((origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(origtime, "%d", &inttime) == 1) {
+ if ((origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(origtime, "%30d", &inttime) == 1) {
time_t ttime = inttime;
struct tm tm;
ast_localtime(&ttime, &tm, NULL);
@@ -3354,7 +3354,7 @@ static void make_email_file(FILE *p, char *srcemail, struct ast_vm_user *vmu, in
/* You might be tempted to do origdate, except that a) it's in the wrong
* format, and b) it's missing for IMAP recordings. */
- if ((v = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(v, "%d", &inttime) == 1) {
+ if ((v = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(v, "%30d", &inttime) == 1) {
time_t ttime = inttime;
struct tm tm;
ast_localtime(&ttime, &tm, NULL);
@@ -7373,7 +7373,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
int gain;
if (!ast_strlen_zero(opts[OPT_ARG_RECORDGAIN])) {
- if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) {
+ if (sscanf(opts[OPT_ARG_RECORDGAIN], "%30d", &gain) != 1) {
ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]);
ast_module_user_remove(u);
return -1;
@@ -7387,7 +7387,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPT_AUTOPLAY) ) {
play_auto = 1;
if (opts[OPT_ARG_PLAYFOLDER]) {
- if (sscanf(opts[OPT_ARG_PLAYFOLDER], "%d", &play_folder) != 1) {
+ if (sscanf(opts[OPT_ARG_PLAYFOLDER], "%30d", &play_folder) != 1) {
ast_log(LOG_WARNING, "Invalid value '%s' provided for folder autoplay option\n", opts[OPT_ARG_PLAYFOLDER]);
}
} else {
@@ -7924,7 +7924,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
if (ast_test_flag(&flags, OPT_RECORDGAIN)) {
int gain;
- if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) {
+ if (sscanf(opts[OPT_ARG_RECORDGAIN], "%30d", &gain) != 1) {
ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]);
ast_module_user_remove(u);
return -1;
@@ -8345,7 +8345,7 @@ static int load_config(void)
volgain = 0.0;
if ((volgainstr = ast_variable_retrieve(cfg, "general", "volgain")))
- sscanf(volgainstr, "%lf", &volgain);
+ sscanf(volgainstr, "%30lf", &volgain);
#ifdef ODBC_STORAGE
strcpy(odbc_database, "asterisk");
@@ -8499,7 +8499,7 @@ static int load_config(void)
vmmaxmessage = 0;
if ((s = ast_variable_retrieve(cfg, "general", "maxmessage"))) {
- if (sscanf(s, "%d", &x) == 1) {
+ if (sscanf(s, "%30d", &x) == 1) {
vmmaxmessage = x;
} else {
ast_log(LOG_WARNING, "Invalid max message time length\n");
@@ -8508,7 +8508,7 @@ static int load_config(void)
vmminmessage = 0;
if ((s = ast_variable_retrieve(cfg, "general", "minmessage"))) {
- if (sscanf(s, "%d", &x) == 1) {
+ if (sscanf(s, "%30d", &x) == 1) {
vmminmessage = x;
if (maxsilence / 1000 >= vmminmessage)
ast_log(LOG_WARNING, "maxsilence should be less than minmessage or you may get empty messages\n");
@@ -8523,7 +8523,7 @@ static int load_config(void)
skipms = 3000;
if ((s = ast_variable_retrieve(cfg, "general", "maxgreet"))) {
- if (sscanf(s, "%d", &x) == 1) {
+ if (sscanf(s, "%30d", &x) == 1) {
maxgreet = x;
} else {
ast_log(LOG_WARNING, "Invalid max message greeting length\n");
@@ -8531,7 +8531,7 @@ static int load_config(void)
}
if ((s = ast_variable_retrieve(cfg, "general", "skipms"))) {
- if (sscanf(s, "%d", &x) == 1) {
+ if (sscanf(s, "%30d", &x) == 1) {
skipms = x;
} else {
ast_log(LOG_WARNING, "Invalid skipms value\n");
@@ -8540,7 +8540,7 @@ static int load_config(void)
maxlogins = 3;
if ((s = ast_variable_retrieve(cfg, "general", "maxlogins"))) {
- if (sscanf(s, "%d", &x) == 1) {
+ if (sscanf(s, "%30d", &x) == 1) {
maxlogins = x;
} else {
ast_log(LOG_WARNING, "Invalid max failed login attempts\n");
@@ -8629,7 +8629,7 @@ static int load_config(void)
saydurationminfo = 2;
if ((astsaydurationminfo = ast_variable_retrieve(cfg, "general", "saydurationm"))) {
- if (sscanf(astsaydurationminfo, "%d", &x) == 1) {
+ if (sscanf(astsaydurationminfo, "%30d", &x) == 1) {
saydurationminfo = x;
} else {
ast_log(LOG_WARNING, "Invalid min duration for say duration\n");