clamav-patch-7054720.diff [plain text]
diff -ur a/clamconf/Makefile.am b/clamconf/Makefile.am
--- a/clamconf/Makefile.am 2013-04-17 09:25:08.000000000 -0600
+++ b/clamconf/Makefile.am 2013-07-10 09:16:53.000000000 -0600
@@ -30,7 +30,7 @@
DEFS = @DEFS@ -DCL_NOTHREADS
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav\
-DBUILD_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILD_CFLAGS="\"$(CFLAGS)\""\
- -DBUILD_CXXFLAGS="\"$(CXXFLAGS)\"" -DBUILD_LDFLAGS="\"$(LDFLAGS)\""\
+ -DBUILD_CXXFLAGS="\"$(CXXFLAGS)\""\
-DBUILD_CONFIGURE_FLAGS="\"$(BUILD_CONFIGURE_FLAGS)\""
LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@ @LIBCLAMAV_LIBS@
CLEANFILES=*.gcda *.gcno
diff -ur a/clamconf/Makefile.in b/clamconf/Makefile.in
--- a/clamconf/Makefile.in 2013-04-17 09:25:08.000000000 -0600
+++ b/clamconf/Makefile.in 2013-07-10 09:17:29.000000000 -0600
@@ -285,7 +285,7 @@
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav\
-DBUILD_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILD_CFLAGS="\"$(CFLAGS)\""\
- -DBUILD_CXXFLAGS="\"$(CXXFLAGS)\"" -DBUILD_LDFLAGS="\"$(LDFLAGS)\""\
+ -DBUILD_CXXFLAGS="\"$(CXXFLAGS)\""\
-DBUILD_CONFIGURE_FLAGS="\"$(BUILD_CONFIGURE_FLAGS)\""
CLEANFILES = *.gcda *.gcno
diff -ur a/configure b/configure
--- a/configure 2013-04-17 09:25:09.000000000 -0600
+++ b/configure 2013-07-10 09:19:21.000000000 -0600
@@ -8106,7 +8106,7 @@
lt_prog_compiler_no_builtin_flag=
if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+ lt_prog_compiler_no_builtin_flag=
{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
@@ -21363,7 +21363,7 @@
#define CLAMAUTH 1
_ACEOF
- use_netinfo="yes"
+ use_netinfo="no"
;;
os2*)
CLAMDSCAN_LIBS="$CLAMDSCAN_LIBS -lsyslog"
diff -ur a/libclamav/c++/configure b/libclamav/c++/configure
--- a/libclamav/c++/configure 2013-04-17 09:25:09.000000000 -0600
+++ b/libclamav/c++/configure 2013-07-10 09:21:17.000000000 -0600
@@ -9281,7 +9281,7 @@
lt_prog_compiler_no_builtin_flag=
if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+ lt_prog_compiler_no_builtin_flag=
{ $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
@@ -13035,7 +13035,7 @@
# We don't want -fno-exception when compiling C++ code, so set the
# no_builtin_flag separately
if test "$GXX" = yes; then
- lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ lt_prog_compiler_no_builtin_flag_CXX=
else
lt_prog_compiler_no_builtin_flag_CXX=
fi
diff -ur a/libclamav/c++/llvm/autoconf/m4/libtool.m4 b/libclamav/c++/llvm/autoconf/m4/libtool.m4
--- a/libclamav/c++/llvm/autoconf/m4/libtool.m4 2013-04-17 09:23:42.000000000 -0600
+++ b/libclamav/c++/llvm/autoconf/m4/libtool.m4 2013-07-10 09:22:39.000000000 -0600
@@ -2799,7 +2799,7 @@
# We don't want -fno-exception wen compiling C++ code, so set the
# no_builtin_flag separately
if test "$GXX" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
else
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
fi
@@ -4590,7 +4590,7 @@
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
if test "$GCC" = yes; then
- _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
lt_cv_prog_compiler_rtti_exceptions,
diff -ur a/libclamav/c++/m4/libtool.m4 b/libclamav/c++/m4/libtool.m4
--- a/libclamav/c++/m4/libtool.m4 2013-04-17 09:25:09.000000000 -0600
+++ b/libclamav/c++/m4/libtool.m4 2013-07-10 09:23:47.000000000 -0600
@@ -3296,7 +3296,7 @@
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
lt_cv_prog_compiler_rtti_exceptions,
@@ -5438,7 +5438,7 @@
# We don't want -fno-exception when compiling C++ code, so set the
# no_builtin_flag separately
if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
else
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
fi
diff -ur a/m4/libtool.m4 b/m4/libtool.m4
--- a/m4/libtool.m4 2013-04-17 09:25:09.000000000 -0600
+++ b/m4/libtool.m4 2013-07-10 09:24:09.000000000 -0600
@@ -3296,7 +3296,7 @@
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
_LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
lt_cv_prog_compiler_rtti_exceptions,
@@ -5438,7 +5438,7 @@
# We don't want -fno-exception when compiling C++ code, so set the
# no_builtin_flag separately
if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
else
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
fi
diff -ur a/shared/output.c b/shared/output.c
--- a/shared/output.c 2013-04-17 09:25:09.000000000 -0600
+++ b/shared/output.c 2013-07-10 09:29:15.000000000 -0600
@@ -329,6 +329,12 @@
}
}
+ /* Apple: Prevent log injection */
+ size_t i;
+ size_t str_len=strlen(buff);
+ for(i=0;i<str_len-1;i++)
+ if(buff[i]=='\n') buff[i]='-';
+
if(logg_fp) {
char flush = !logg_noflush;
/* Need to avoid logging time for verbose messages when logverbose