15842
15897
$as_echo "$as_me: WARNING: ****** It is recommended to fix your build environment so that we can run the testcase!" >&2;}
15843
15898
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Please do not report stability problems to the ClamAV developers!" >&5
15844
15899
$as_echo "$as_me: WARNING: ****** Please do not report stability problems to the ClamAV developers!" >&2;}
15900
bzip_check="link failed (CVE-2008-1372)"
15847
15903
case "$ac_cv_c_cve_2008_1372" in
15848
15904
ok|bugged|linkfailed)
15912
if test "$HAVE_LIBBZ2" = "yes"; then
15913
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CVE-2010-0405" >&5
15914
$as_echo_n "checking for CVE-2010-0405... " >&6; }
15915
if test "${ac_cv_c_cve_2010_0405+set}" = set; then :
15916
$as_echo_n "(cached) " >&6
15920
LIBS="$LIBCLAMAV_LIBS $LIBBZ2"
15921
if test "$cross_compiling" = yes; then :
15922
ac_cv_c_cve_2010_0405=ok
15924
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15925
/* end confdefs.h. */
15927
#include <string.h>
15928
#include <stdlib.h>
15933
#define BZ2_bzReadOpen bzReadOpen
15934
#define BZ2_bzReadClose bzReadClose
15935
#define BZ2_bzRead bzRead
15936
#define BZ2_bzDecompressInit bzDecompressInit
15937
#define BZ2_bzDecompress bzDecompress
15938
#define BZ2_bzDecompressEnd bzDecompressEnd
15941
const unsigned char poc[] = {
15942
0x42, 0x5a, 0x68, 0x39, 0x31, 0x41, 0x59, 0x26, 0x53, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15943
0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
15944
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
15945
0xff, 0xff, 0xfe, 0x20, 0x2c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15946
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15947
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15948
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15949
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15950
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15951
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15952
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
15953
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15954
0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
15955
0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15956
0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
15957
0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
15958
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
15959
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff
15961
const unsigned int poc_len = 280;
15963
int main (int argc, char **argv) {
15967
memset(&bz, 0, sizeof(bz));
15968
bz.next_in = (char *)&poc;
15969
bz.avail_in = poc_len;
15971
bz.avail_out = sizeof(buf);
15972
if(BZ2_bzDecompressInit(&bz, 0, 0)!=BZ_OK)
15975
while((BZ2_bzDecompress(&bz))==BZ_OK) {
15977
bz.avail_out = sizeof(buf);
15979
BZ2_bzDecompressEnd(&bz);
15984
if ac_fn_c_try_run "$LINENO"; then :
15985
ac_cv_c_cve_2010_0405=ok
15988
if test $? -gt 127; then
15989
ac_cv_c_cve_2010_0405=bugged
15991
ac_cv_c_cve_2010_0405=linkfailed
15995
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15996
conftest.$ac_objext conftest.beam conftest.$ac_ext
16002
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_cve_2010_0405" >&5
16003
$as_echo "$ac_cv_c_cve_2010_0405" >&6; }
16005
if test "$ac_cv_c_cve_2010_0405" = "bugged"; then
16006
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** bzip2 libraries are affected by the CVE-2010-0405 bug" >&5
16007
$as_echo "$as_me: WARNING: ****** bzip2 libraries are affected by the CVE-2010-0405 bug" >&2;}
16008
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** We strongly suggest you to update bzip2" >&5
16009
$as_echo "$as_me: WARNING: ****** We strongly suggest you to update bzip2" >&2;}
16010
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Please do not report stability problems to the ClamAV developers!" >&5
16011
$as_echo "$as_me: WARNING: ****** Please do not report stability problems to the ClamAV developers!" >&2;}
16012
bzip_check="bugged (CVE-2010-0405)"
16014
if test "$ac_cv_c_cve_2010_0405" = "linkfailed"; then
16015
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Unable to link bzip2 testcase" >&5
16016
$as_echo "$as_me: WARNING: ****** Unable to link bzip2 testcase" >&2;}
16017
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** You may be affected by CVE-2010-0405 bug, but I need to be able to link a testcase to verify" >&5
16018
$as_echo "$as_me: WARNING: ****** You may be affected by CVE-2010-0405 bug, but I need to be able to link a testcase to verify" >&2;}
16019
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** It is recommended to fix your build environment so that we can run the testcase!" >&5
16020
$as_echo "$as_me: WARNING: ****** It is recommended to fix your build environment so that we can run the testcase!" >&2;}
16021
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Please do not report stability problems to the ClamAV developers!" >&5
16022
$as_echo "$as_me: WARNING: ****** Please do not report stability problems to the ClamAV developers!" >&2;}
16023
bzip_check="link failed (CVE-2010-0405)"
16026
case "$ac_cv_c_cve_2010_0405" in
16027
ok|bugged|linkfailed)
15849
16028
LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $LTLIBBZ2"
15851
16030
$as_echo "#define HAVE_BZLIB_H 1" >>confdefs.h
20080
20177
if test -z "${VERSIONSCRIPT_TRUE}" && test -z "${VERSIONSCRIPT_FALSE}"; then
20081
as_fn_error "conditional \"VERSIONSCRIPT\" was never defined.
20178
as_fn_error $? "conditional \"VERSIONSCRIPT\" was never defined.
20082
20179
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20084
20181
if test -z "${HAVE_LIBCHECK_TRUE}" && test -z "${HAVE_LIBCHECK_FALSE}"; then
20085
as_fn_error "conditional \"HAVE_LIBCHECK\" was never defined.
20182
as_fn_error $? "conditional \"HAVE_LIBCHECK\" was never defined.
20086
20183
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20088
20185
if test -z "${ENABLE_COVERAGE_TRUE}" && test -z "${ENABLE_COVERAGE_FALSE}"; then
20089
as_fn_error "conditional \"ENABLE_COVERAGE\" was never defined.
20186
as_fn_error $? "conditional \"ENABLE_COVERAGE\" was never defined.
20090
20187
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20092
20189
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
20093
as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
20190
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
20094
20191
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20096
20193
if test -z "${ENABLE_UNRAR_TRUE}" && test -z "${ENABLE_UNRAR_FALSE}"; then
20097
as_fn_error "conditional \"ENABLE_UNRAR\" was never defined.
20194
as_fn_error $? "conditional \"ENABLE_UNRAR\" was never defined.
20098
20195
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20100
20197
if test -z "${LINK_TOMMATH_TRUE}" && test -z "${LINK_TOMMATH_FALSE}"; then
20101
as_fn_error "conditional \"LINK_TOMMATH\" was never defined.
20198
as_fn_error $? "conditional \"LINK_TOMMATH\" was never defined.
20102
20199
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20104
20201
if test -z "${BUILD_CLAMD_TRUE}" && test -z "${BUILD_CLAMD_FALSE}"; then
20105
as_fn_error "conditional \"BUILD_CLAMD\" was never defined.
20202
as_fn_error $? "conditional \"BUILD_CLAMD\" was never defined.
20106
20203
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20108
20205
if test -z "${HAVE_MILTER_TRUE}" && test -z "${HAVE_MILTER_FALSE}"; then
20109
as_fn_error "conditional \"HAVE_MILTER\" was never defined.
20206
as_fn_error $? "conditional \"HAVE_MILTER\" was never defined.
20110
20207
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20112
20209
if test -z "${HAVE_CURSES_TRUE}" && test -z "${HAVE_CURSES_FALSE}"; then
20113
as_fn_error "conditional \"HAVE_CURSES\" was never defined.
20210
as_fn_error $? "conditional \"HAVE_CURSES\" was never defined.
20211
Usually this means the macro was only invoked conditionally." "$LINENO" 5
20213
if test -z "${BUILD_SHA1_TRUE}" && test -z "${BUILD_SHA1_FALSE}"; then
20214
as_fn_error $? "conditional \"BUILD_SHA1\" was never defined.
20114
20215
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22655
22772
if test -z "${VERSIONSCRIPT_TRUE}" && test -z "${VERSIONSCRIPT_FALSE}"; then
22656
as_fn_error "conditional \"VERSIONSCRIPT\" was never defined.
22773
as_fn_error $? "conditional \"VERSIONSCRIPT\" was never defined.
22657
22774
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22659
22776
if test -z "${HAVE_LIBCHECK_TRUE}" && test -z "${HAVE_LIBCHECK_FALSE}"; then
22660
as_fn_error "conditional \"HAVE_LIBCHECK\" was never defined.
22777
as_fn_error $? "conditional \"HAVE_LIBCHECK\" was never defined.
22661
22778
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22663
22780
if test -z "${ENABLE_COVERAGE_TRUE}" && test -z "${ENABLE_COVERAGE_FALSE}"; then
22664
as_fn_error "conditional \"ENABLE_COVERAGE\" was never defined.
22781
as_fn_error $? "conditional \"ENABLE_COVERAGE\" was never defined.
22665
22782
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22667
22784
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
22668
as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
22785
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
22669
22786
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22671
22788
if test -z "${ENABLE_UNRAR_TRUE}" && test -z "${ENABLE_UNRAR_FALSE}"; then
22672
as_fn_error "conditional \"ENABLE_UNRAR\" was never defined.
22789
as_fn_error $? "conditional \"ENABLE_UNRAR\" was never defined.
22673
22790
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22675
22792
if test -z "${LINK_TOMMATH_TRUE}" && test -z "${LINK_TOMMATH_FALSE}"; then
22676
as_fn_error "conditional \"LINK_TOMMATH\" was never defined.
22793
as_fn_error $? "conditional \"LINK_TOMMATH\" was never defined.
22677
22794
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22679
22796
if test -z "${BUILD_CLAMD_TRUE}" && test -z "${BUILD_CLAMD_FALSE}"; then
22680
as_fn_error "conditional \"BUILD_CLAMD\" was never defined.
22797
as_fn_error $? "conditional \"BUILD_CLAMD\" was never defined.
22681
22798
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22683
22800
if test -z "${HAVE_MILTER_TRUE}" && test -z "${HAVE_MILTER_FALSE}"; then
22684
as_fn_error "conditional \"HAVE_MILTER\" was never defined.
22801
as_fn_error $? "conditional \"HAVE_MILTER\" was never defined.
22685
22802
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22687
22804
if test -z "${HAVE_CURSES_TRUE}" && test -z "${HAVE_CURSES_FALSE}"; then
22688
as_fn_error "conditional \"HAVE_CURSES\" was never defined.
22805
as_fn_error $? "conditional \"HAVE_CURSES\" was never defined.
22806
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22808
if test -z "${BUILD_SHA1_TRUE}" && test -z "${BUILD_SHA1_FALSE}"; then
22809
as_fn_error $? "conditional \"BUILD_SHA1\" was never defined.
22689
22810
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22691
22812
if test -z "${am__EXEEXT_TRUE}" && test -z "${am__EXEEXT_FALSE}"; then
22692
as_fn_error "conditional \"am__EXEEXT\" was never defined.
22813
as_fn_error $? "conditional \"am__EXEEXT\" was never defined.
22693
22814
Usually this means the macro was only invoked conditionally." "$LINENO" 5
22695
22816
if test -z "${ENABLE_LLVM_TRUE}" && test -z "${ENABLE_LLVM_FALSE}"; then
22696
as_fn_error "conditional \"ENABLE_LLVM\" was never defined.
22817
as_fn_error $? "conditional \"ENABLE_LLVM\" was never defined.
22697
22818
Usually this means the macro was only invoked conditionally." "$LINENO" 5