]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
prevent seg faults
authorRussell Bryant <russell@russellbryant.com>
Mon, 27 Dec 2004 22:34:25 +0000 (22:34 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 27 Dec 2004 22:34:25 +0000 (22:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4562 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c
loader.c
logger.c

index 6d38b152e115f81bfd13eb8880d6b868e1255a51..17df8232183cf6a789961708086b318220aa6167 100755 (executable)
@@ -2322,7 +2322,7 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
                                snprintf(todir, sizeof(todir), "%s/voicemail/%s/%s/INBOX",  (char *)ast_config_AST_SPOOL_DIR, vmtmp->context, vmtmp->mailbox);
                                snprintf(sys, sizeof(sys), "mkdir -p %s\n", todir);
                                snprintf(ext_context, sizeof(ext_context), "%s@%s", vmtmp->mailbox, vmtmp->context);
-                               ast_log(LOG_DEBUG, sys);
+                               ast_log(LOG_DEBUG, "%s", sys);
                                ast_safe_system(sys);
                
                                todircount = count_messages(todir);
@@ -2333,11 +2333,11 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
                                        if (!strcasecmp(s, "wav49"))
                                                s = "WAV";
                                        snprintf(sys, sizeof(sys), "cp %s/msg%04d.%s %s/msg%04d.%s\n", dir, curmsg, s, todir, todircount, s);
-                                       ast_log(LOG_DEBUG, sys);
+                                       ast_log(LOG_DEBUG, "%s", sys);
                                        ast_safe_system(sys);
                                }
                                snprintf(sys, sizeof(sys), "cp %s/msg%04d.txt %s/msg%04d.txt\n", dir, curmsg, todir, todircount);
-                               ast_log(LOG_DEBUG, sys);
+                               ast_log(LOG_DEBUG, "%s", sys);
                                ast_safe_system(sys);
                                snprintf(fn, sizeof(fn), "%s/msg%04d", todir,todircount);
        
index 5879306c9d827c81ebe6180f547c7ba0a3ff190b..0720d0670cf95f9b8b1c46a5552e40b4a68e98ae 100755 (executable)
--- a/loader.c
+++ b/loader.c
@@ -67,7 +67,7 @@ static int printdigest(unsigned char *d)
                strcat(buf, buf2);
        }
        strcat(buf, "\n");
-       ast_log(LOG_DEBUG, buf);
+       ast_log(LOG_DEBUG, "%s", buf);
        return 0;
 }
 
index 4148c10e040c3f6e564b7c6da5e6adb09026e74e..cafe4d70dba374fbd8062f39cddbaeb9d88bc32b 100755 (executable)
--- a/logger.c
+++ b/logger.c
@@ -649,7 +649,7 @@ extern void ast_verbose(const char *fmt, ...)
        } /* else
                fprintf(stdout, stuff + opos); */
 
-       ast_log(LOG_VERBOSE, stuff);
+       ast_log(LOG_VERBOSE, "%s", stuff);
 
        if (fmt[strlen(fmt)-1] != '\n') 
                replacelast = 1;