Source: python-clamav Version: 0.4.1-8 Severity: important Tags: patch The patch attached lets python-clamav compile against clamav from experimental (it does not compile unstable anymore).
Sebastian
From: Sebastian Andrzej Siewior <sebast...@breakpoint.cc> Date: Wed, 30 Jan 2019 23:22:55 +0100 Subject: [PATCH] python-clamav: add support for clamav 0.101.0 CL_SCAN_GENERAL_ALLMATCHES with all parses should do what CL_SCAN_STDOPT did. Signed-off-by: Sebastian Andrzej Siewior <sebast...@breakpoint.cc> --- pyclamav.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyclamav.c b/pyclamav.c index 7ccd57239b97..0315c62ea81a 100644 --- a/pyclamav.c +++ b/pyclamav.c @@ -191,6 +191,7 @@ static PyObject *pyclamav_scanfile(PyObject *self, PyObject *args) char *file_to_scan; unsigned long int size = 0; const char *virname; + struct cl_scan_options scan_options; int ret = 0; /* Raise exception if database error */ @@ -209,8 +210,11 @@ static PyObject *pyclamav_scanfile(PyObject *self, PyObject *args) PyErr_SetString(PyExc_ValueError, "Argument is not a filename"); return NULL; } + memset(&scan_options, 0, sizeof(scan_options)); + scan_options.general = CL_SCAN_GENERAL_ALLMATCHES; + scan_options.parse = ~0; - ret = cl_scanfile(file_to_scan, &virname, &size, engine, CL_SCAN_STDOPT); + ret = cl_scanfile(file_to_scan, &virname, &size, engine, &scan_options); /* Test return code */ switch (ret) { -- 2.11.0