fix handling of special characters in mprintf (bb#360)

git-svn: trunk@2888
remotes/push_mirror/metadata
Tomasz Kojm 18 years ago
parent a9d251e049
commit 6b04ac13b1
  1. 4
      ChangeLog
  2. 8
      shared/output.c

@ -1,3 +1,7 @@
Thu Mar 1 16:21:48 CET 2007 (tk)
---------------------------------
* shared/output.c: fix handling of special characters in mprintf (bb#360)
Thu Mar 1 14:56:44 GMT 2007 (njh)
----------------------------------
* libclamav/mbox.c: Fix bug 358

@ -287,20 +287,20 @@ void mprintf(const char *str, ...)
vsnprintf(buff, sizeof(buff), str, args);
va_end(args);
if(buff[0] == '!') {
if(*str == '!') {
if(!mprintf_stdout)
fd = stderr;
fprintf(fd, "ERROR: %s", &buff[1]);
} else if(buff[0] == '@') {
} else if(*str == '@') {
if(!mprintf_stdout)
fd = stderr;
fprintf(fd, "ERROR: %s", &buff[1]);
} else if(!mprintf_quiet) {
if(buff[0] == '^') {
if(*str == '^') {
if(!mprintf_stdout)
fd = stderr;
fprintf(fd, "WARNING: %s", &buff[1]);
} else if(buff[0] == '*') {
} else if(*str == '*') {
if(mprintf_verbose)
fprintf(fd, "%s", &buff[1]);
} else fprintf(fd, "%s", buff);

Loading…
Cancel
Save