diff options
author | Larry Rosenman <ler@FreeBSD.org> | 2017-09-22 16:11:54 +0000 |
---|---|---|
committer | Larry Rosenman <ler@FreeBSD.org> | 2017-09-22 16:11:54 +0000 |
commit | 1faef9ef46b8b7ce198603c54216c6b8fbeaabbd (patch) | |
tree | dd21bebeef8e62c12b62c19a41144f033ddda642 /security/clamav | |
parent | f695bb64802d4b3d3bbb9152bcd1538c50547647 (diff) | |
download | ports-1faef9ef46b8b7ce198603c54216c6b8fbeaabbd.tar.gz ports-1faef9ef46b8b7ce198603c54216c6b8fbeaabbd.zip |
Notes
Diffstat (limited to 'security/clamav')
-rw-r--r-- | security/clamav/files/patch-configure | 9 | ||||
-rw-r--r-- | security/clamav/files/patch-libclamav_bytecode__api.c | 44 | ||||
-rw-r--r-- | security/clamav/files/patch-libclamav_c++_llvm_include_llvm_Support_CFG.h (renamed from security/clamav/files/patch-libclamav-c++-llvm) | 16 |
3 files changed, 52 insertions, 17 deletions
diff --git a/security/clamav/files/patch-configure b/security/clamav/files/patch-configure index c72f937afb62..7042607e7dfb 100644 --- a/security/clamav/files/patch-configure +++ b/security/clamav/files/patch-configure @@ -12,15 +12,6 @@ fi if test -n "$vuln"; then -@@ -20758,7 +20758,7 @@ $as_echo "#define C_BSD 1" >>confdefs.h - ;; - freebsd*) - if test "$have_pthreads" = "yes"; then -- THREAD_LIBS="-lthr" -+ THREAD_LIBS="%%PTHREAD_LIBS%%" - TH_SAFE="-thread-safe" - fi - @@ -20934,7 +20934,7 @@ esac if test "$have_milter" = "yes"; then diff --git a/security/clamav/files/patch-libclamav_bytecode__api.c b/security/clamav/files/patch-libclamav_bytecode__api.c new file mode 100644 index 000000000000..a7dc54d56c0d --- /dev/null +++ b/security/clamav/files/patch-libclamav_bytecode__api.c @@ -0,0 +1,44 @@ +--- libclamav/bytecode_api.c.orig 2016-04-22 15:02:19 UTC ++++ libclamav/bytecode_api.c +@@ -811,8 +811,19 @@ int32_t cli_bcapi_inflate_init(struct cli_bc_ctx *ctx, + cli_dbgmsg("bytecode api: inflate_init: invalid buffers!\n"); + return -1; + } +- memset(&stream, 0, sizeof(stream)); +- ret = inflateInit2(&stream, windowBits); ++ b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n); ++ if (!b) { ++ return -1; ++ } ++ ctx->inflates = b; ++ ctx->ninflates = n; ++ b = &b[n-1]; ++ ++ b->from = from; ++ b->to = to; ++ b->needSync = 0; ++ memset(&b->stream, 0, sizeof(stream)); ++ ret = inflateInit2(&b->stream, windowBits); + switch (ret) { + case Z_MEM_ERROR: + cli_dbgmsg("bytecode api: inflateInit2: out of memory!\n"); +@@ -830,19 +841,6 @@ int32_t cli_bcapi_inflate_init(struct cli_bc_ctx *ctx, + return -1; + } + +- b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n); +- if (!b) { +- inflateEnd(&stream); +- return -1; +- } +- ctx->inflates = b; +- ctx->ninflates = n; +- b = &b[n-1]; +- +- b->from = from; +- b->to = to; +- b->needSync = 0; +- memcpy(&b->stream, &stream, sizeof(stream)); + return n-1; + } + diff --git a/security/clamav/files/patch-libclamav-c++-llvm b/security/clamav/files/patch-libclamav_c++_llvm_include_llvm_Support_CFG.h index 7407c8129d6e..dd70c2ca4d20 100644 --- a/security/clamav/files/patch-libclamav-c++-llvm +++ b/security/clamav/files/patch-libclamav_c++_llvm_include_llvm_Support_CFG.h @@ -1,6 +1,6 @@ ---- libclamav/c++/llvm/include/llvm/Support/CFG.h.orig +--- libclamav/c++/llvm/include/llvm/Support/CFG.h.orig 2016-04-22 15:02:19 UTC +++ libclamav/c++/llvm/include/llvm/Support/CFG.h -@@ -27,8 +27,9 @@ +@@ -27,8 +27,9 @@ namespace llvm { template <class Ptr, class USE_iterator> // Predecessor Iterator class PredIterator : public std::iterator<std::forward_iterator_tag, @@ -12,15 +12,15 @@ typedef PredIterator<Ptr, USE_iterator> Self; USE_iterator It; -@@ -40,6 +41,7 @@ +@@ -40,6 +41,7 @@ class PredIterator : public std::iterator<std::forward public: typedef typename super::pointer pointer; + typedef typename super::reference reference; - PredIterator() {} explicit inline PredIterator(Ptr *bb) : It(bb->use_begin()) { -@@ -50,7 +52,7 @@ + advancePastNonTerminators(); +@@ -49,7 +51,7 @@ class PredIterator : public std::iterator<std::forward inline bool operator==(const Self& x) const { return It == x.It; } inline bool operator!=(const Self& x) const { return !operator==(x); } @@ -29,7 +29,7 @@ assert(!It.atEnd() && "pred_iterator out of range!"); return cast<TerminatorInst>(*It)->getParent(); } -@@ -100,10 +102,11 @@ +@@ -87,10 +89,11 @@ inline const_pred_iterator pred_end(const BasicBlock * template <class Term_, class BB_> // Successor Iterator class SuccIterator : public std::iterator<std::bidirectional_iterator_tag, @@ -43,7 +43,7 @@ typedef SuccIterator<Term_, BB_> Self; inline bool index_is_valid(int idx) { -@@ -112,6 +115,7 @@ +@@ -99,6 +102,7 @@ class SuccIterator : public std::iterator<std::bidirec public: typedef typename super::pointer pointer; @@ -51,7 +51,7 @@ // TODO: This can be random access iterator, only operator[] missing. explicit inline SuccIterator(Term_ T) : Term(T), idx(0) {// begin iterator -@@ -142,7 +146,7 @@ +@@ -122,7 +126,7 @@ class SuccIterator : public std::iterator<std::bidirec inline bool operator==(const Self& x) const { return idx == x.idx; } inline bool operator!=(const Self& x) const { return !operator==(x); } |