diff -Nru c-icap-modules-0.3.1/configure c-icap-modules-0.3.2/configure --- c-icap-modules-0.3.1/configure 2013-11-05 16:27:20.000000000 +0000 +++ c-icap-modules-0.3.2/configure 2013-12-27 15:35:47.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for c_icap_modules 0.3.1. +# Generated by GNU Autoconf 2.68 for c_icap_modules 0.3.2. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ # Identity of this package. PACKAGE_NAME='c_icap_modules' PACKAGE_TARNAME='c_icap_modules' -PACKAGE_VERSION='0.3.1' -PACKAGE_STRING='c_icap_modules 0.3.1' +PACKAGE_VERSION='0.3.2' +PACKAGE_STRING='c_icap_modules 0.3.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1314,7 +1314,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures c_icap_modules 0.3.1 to adapt to many kinds of systems. +\`configure' configures c_icap_modules 0.3.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1384,7 +1384,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of c_icap_modules 0.3.1:";; + short | recursive ) echo "Configuration of c_icap_modules 0.3.2:";; esac cat <<\_ACEOF @@ -1492,7 +1492,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -c_icap_modules configure 0.3.1 +c_icap_modules configure 0.3.2 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1857,7 +1857,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by c_icap_modules $as_me 0.3.1, which was +It was created by c_icap_modules $as_me 0.3.2, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2699,7 +2699,7 @@ # Define the identity of the package. PACKAGE='c_icap_modules' - VERSION='0.3.1' + VERSION='0.3.2' cat >>confdefs.h <<_ACEOF @@ -13307,7 +13307,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by c_icap_modules $as_me 0.3.1, which was +This file was extended by c_icap_modules $as_me 0.3.2, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13373,7 +13373,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -c_icap_modules config.status 0.3.1 +c_icap_modules config.status 0.3.2 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -Nru c-icap-modules-0.3.1/configure.in c-icap-modules-0.3.2/configure.in --- c-icap-modules-0.3.1/configure.in 2013-11-05 16:27:20.000000000 +0000 +++ c-icap-modules-0.3.2/configure.in 2013-12-27 15:34:12.000000000 +0000 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(c_icap_modules,0.3.1) +AC_INIT(c_icap_modules,0.3.2) AM_MAINTAINER_MODE AM_CONFIG_HEADER(autoconf.h) diff -Nru c-icap-modules-0.3.1/debian/changelog c-icap-modules-0.3.2/debian/changelog --- c-icap-modules-0.3.1/debian/changelog 2013-12-21 20:51:19.000000000 +0000 +++ c-icap-modules-0.3.2/debian/changelog 2014-01-25 18:10:43.000000000 +0000 @@ -1,24 +1,20 @@ -c-icap-modules (1:0.3.1-2ubuntu2) trusty; urgency=medium +c-icap-modules (1:0.3.2-1) unstable; urgency=medium - * 0002-Implicit-declaration.patch: Replace strcasestr() with ci_strcasestr() - - -- Adam Conrad Sat, 21 Dec 2013 13:20:31 -0700 - -c-icap-modules (1:0.3.1-2ubuntu1) trusty; urgency=medium - - * 0002-Implicit-declaration.patch: Include to get strcasestr(). - * debian/{control,rules}: Builddep on and use dh-autoreconf for new ports. + * New upstream release + * Updated Standards-Version to 3.9.5 - no change + * Use dh-autoreconf (Closes: #736634) + * Use ci_strcasestr() instead of strcasestr() (Closes: #732801) - -- Adam Conrad Sat, 21 Dec 2013 12:29:23 -0700 + -- Mathieu Parent Sat, 25 Jan 2014 19:10:27 +0100 c-icap-modules (1:0.3.1-2) unstable; urgency=medium * really Build-Depends on libdb-dev (Closes: #708351) * copyright: - move to copyright-format/1.0 - - c-icap-modules is GPL-2.0+ (Closes: #732559) + - c-icap-modules is GPL-2+ (Closes: #732559) - -- Mathieu Parent Sat, 21 Dec 2013 10:37:15 +0100 + -- Mathieu Parent Sat, 21 Dec 2013 10:23:13 +0100 c-icap-modules (1:0.3.1-1) unstable; urgency=low diff -Nru c-icap-modules-0.3.1/debian/control c-icap-modules-0.3.2/debian/control --- c-icap-modules-0.3.1/debian/control 2013-12-21 19:41:44.000000000 +0000 +++ c-icap-modules-0.3.2/debian/control 2014-01-25 18:10:43.000000000 +0000 @@ -1,11 +1,10 @@ Source: c-icap-modules Section: net Priority: extra -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Tim Weippert +Maintainer: Tim Weippert Uploaders: Jochen Friedrich , Mathieu Parent Build-Depends: debhelper (>= 9~), autotools-dev, libicapapi-dev (>=1:0.3.1~), libclamav-dev, libltdl-dev | libltdl3-dev, libdb-dev, dh-autoreconf -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Homepage: http://c-icap.sourceforge.net/ Package: libc-icap-mod-virus-scan diff -Nru c-icap-modules-0.3.1/debian/copyright c-icap-modules-0.3.2/debian/copyright --- c-icap-modules-0.3.1/debian/copyright 2013-12-21 09:37:38.000000000 +0000 +++ c-icap-modules-0.3.2/debian/copyright 2014-01-25 18:10:43.000000000 +0000 @@ -4,27 +4,32 @@ Files: * Copyright: 2004-2013 Christos Tsantilas -License: GPL-2.0+ +License: GPL-2+ Files: debian/* Copyright: 2010 Tim Weippert 2013 Mathieu Parent -License: GPL-2.0+ +License: GPL-2+ -License: GPL-2.0+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. +License: GPL-2+ + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. . - You should have received a copy of the GNU General Public License - along with this program. If not, see + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA . - On Debian systems, the complete text of the GNU General - Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. diff -Nru c-icap-modules-0.3.1/services/virus_scan/clamd_mod.c c-icap-modules-0.3.2/services/virus_scan/clamd_mod.c --- c-icap-modules-0.3.1/services/virus_scan/clamd_mod.c 2013-11-05 16:27:20.000000000 +0000 +++ c-icap-modules-0.3.2/services/virus_scan/clamd_mod.c 2013-12-27 15:18:54.000000000 +0000 @@ -308,7 +308,7 @@ int clamd_get_versions(unsigned int *level, unsigned int *version, char *str_version, size_t str_version_len) { - char buf[1024]; + char buf[1024], *s; int ret, v1, v2, v3; int sockfd = clamd_connect(); if (sockfd < 0) @@ -326,16 +326,29 @@ return 0; } - ret = sscanf(buf, "ClamAV %d.%d.%d/%d/", &v1, &v2, &v3, version); - if (ret != 4) { - ci_debug_printf(1, "clamd_get_versions: parse error. Response string: %s\n", buf); + if (strncasecmp(buf, "ClamAV", 6) != 0) { + ci_debug_printf(1, "clamd_get_versions: Wrong response from clamd server: %s\n", buf); clamd_release_connection(sockfd); return 0; } + + s = strchr(buf, '/'); + *version = 0; + if (s) { + ++s; + *version = strtol(s, NULL, 10); + } + v1 = v2 = v3 = 0; + ret = sscanf(buf + 7, "%d.%d.%d", &v1, &v2, &v3); + if (*version == 0 || ret < 2) { + ci_debug_printf(1, "clamd_get_versions: WARNING: Can not parse response from clamd server: %s\n", buf); + } + snprintf(str_version, str_version_len, "%d%d%d", v1,v2,v3); str_version[str_version_len - 1] = '\0'; *level = 0; /*We are not able to retrieve level*/ + ci_debug_printf(6, "clamd_get_versions: Succesfully parse response from clamd server: %s (version: %d, strversion: '%s')\n", buf, *version, str_version); clamd_release_connection(sockfd); return 1; } diff -Nru c-icap-modules-0.3.1/services/virus_scan/decode.c c-icap-modules-0.3.2/services/virus_scan/decode.c --- c-icap-modules-0.3.1/services/virus_scan/decode.c 2013-11-05 16:27:20.000000000 +0000 +++ c-icap-modules-0.3.2/services/virus_scan/decode.c 2013-12-27 15:20:03.000000000 +0000 @@ -39,12 +39,15 @@ static int do_file_write(ci_simple_file_t *fout, const void *buf, size_t count) { int bytes, to_write; errno = 0; - to_write = count; + to_write = (int)count; do { - bytes = ci_simple_file_write(fout, buf, (int)count, 0); - if (bytes > 0) + bytes = ci_simple_file_write(fout, buf, to_write, 0); + if (bytes > 0) { + buf += bytes; to_write -= bytes; - }while ( bytes >= 0 || to_write > 0); + } else /* will result to decoding error */ + return 0; + } while (to_write > 0); return count; }