--- maildir-filter-1.20.orig/debian/compat +++ maildir-filter-1.20/debian/compat @@ -0,0 +1 @@ +5 --- maildir-filter-1.20.orig/debian/manpages +++ maildir-filter-1.20/debian/manpages @@ -0,0 +1 @@ +maildir-filter.1 --- maildir-filter-1.20.orig/debian/copyright +++ maildir-filter-1.20/debian/copyright @@ -0,0 +1,22 @@ +This package was debianized by Daniel Ruoso on +Thu, 21 Mar 2002 11:14:36 -0300. + +Copyright: + +Copyright (C) 2002 Marcelo de Paula Bezerra + +This 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, or (at your option) any later +version. + +This 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 with +your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with +the dpkg source package as the file COPYING. If not, write to the Free +Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. --- maildir-filter-1.20.orig/debian/changelog +++ maildir-filter-1.20/debian/changelog @@ -0,0 +1,105 @@ +maildir-filter (1.20-2) unstable; urgency=low + + * Check the return of realloc in maildir-filter.c:108 + (Closes: #422610). + * Uses a more efficient alogorithm, provided by Steve Langasek. + * Fixes a minor typing error (Closes: #390051). + * Removes reference to homepage, as its offline for a very long time + now. + * Updated standards-version. + * Removed reference to non-free package in suggests. + * Promoted to DH_COMPAT 5. + * No longer ignores make clean errors. + + -- Daniel Ruoso Wed, 5 Sep 2007 15:11:17 +0100 + +maildir-filter (1.20-1.1) unstable; urgency=medium + + * Non-maintainer upload during BSP. + * Assign result of realloc in maildir-filter.c:108 to a temporary variable + called tmpaddr to fix FTBFS (Closes: #422610). + + -- Mario Iseli Fri, 18 May 2007 20:31:53 +0200 + +maildir-filter (1.20-1) unstable; urgency=low + + * New upstream version (Closes: #259331) + + -- Daniel Ruoso Mon, 9 Aug 2004 18:22:45 -0300 + +maildir-filter (1.19-1) unstable; urgency=low + + * Taking maintainership to first upload (Closes: #221900) + * Redesign of debian package, complete renaming to maildir-filter. + * Rewrite the debian/rules file. + * Removed arch-specific optimization from Makefile. + + -- Daniel Ruoso Thu, 26 Feb 2004 12:03:03 -0300 + +maildir-filter (1.18-1) unstable; urgency=low + + * Renamed to maildir-filter + * add manpage + * fix all lintian warnings + + -- Marcelo Bezerra Tue, 23 Dec 2003 10:50:22 -0300 + +maildir-filter (1.17-1) unstable; urgency=low + + * Sync debian and cvs version numbers. + + -- Marcelo Bezerra Thu, 20 Nov 2003 16:52:52 -0300 + +maildir-filter (1.11-4) unstable; urgency=low + + * Cosmetic fix to version display + + -- Marcelo Bezerra Thu, 20 Nov 2003 11:59:20 -0300 + +maildir-filter (1.11-3) unstable; urgency=low + + * Add missing build dependency to dhmake. + + -- Marcelo Bezerra Thu, 20 Nov 2003 09:47:17 -0300 + +maildir-filter (1.11-2) unstable; urgency=low + + * Decrease memory waste + + -- Marcelo Bezerra Tue, 18 Nov 2003 17:10:49 -0300 + +maildir-filter (1.11-1) unstable; urgency=low + + * Now headers only works + + -- Sun, 16 Mar 2003 02:12:49 -0300 + +maildir-filter (1.10-1) unstable; urgency=low + + * New upstream version + * now can match only in headers + + -- Sun, 16 Mar 2003 01:51:52 -0300 + +maildir-filter (1.9-1) unstable; urgency=low + + * new upstream version. + * logs msg bytes when delivering + * killed bug in options parsing + * supports negated rules + * added -V to print version information + * changed -v to -p (print message to stdout) + + -- Sun, 16 Mar 2003 01:13:39 -0300 + +maildir-filter (1.5-2) unstable; urgency=low + + * killed many warningns + + -- Sat, 15 Mar 2003 12:19:25 -0300 + +maildir-filter (1.5-1) unstable; urgency=low + + * Initial release. + + -- Sat, 15 Mar 2003 11:18:17 -0300 --- maildir-filter-1.20.orig/debian/control +++ maildir-filter-1.20/debian/control @@ -0,0 +1,14 @@ +Source: maildir-filter +Section: mail +Priority: optional +Maintainer: Daniel Ruoso +Build-Depends: debhelper (>> 5.0.0), libpcre3-dev +Standards-Version: 3.7.2.2 + +Package: maildir-filter +Architecture: any +Depends: ${shlibs:Depends} +Description: Simple program to filter messages into Maildir folders from dot-qmail + This program was designed to filter messages based on regular expressions with + perl syntax and perform actions on them (deliver on a Maildir folder, send it + to oblivion or bounce it). --- maildir-filter-1.20.orig/debian/dirs +++ maildir-filter-1.20/debian/dirs @@ -0,0 +1 @@ +usr/bin --- maildir-filter-1.20.orig/debian/rules +++ maildir-filter-1.20/debian/rules @@ -0,0 +1,55 @@ +#!/usr/bin/make -f + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + $(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + $(MAKE) clean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) install DESTDIR=$(CURDIR)/debian/maildir-filter + +binary-indep: build install + +binary-arch: build install + dh_strip + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installman + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- maildir-filter-1.20.orig/maildir-filter.c +++ maildir-filter-1.20/maildir-filter.c @@ -44,7 +44,6 @@ int main(int argc,char **argv) { - char *line=NULL; int c; char *pattern=NULL; const char *err_msg=NULL; @@ -102,15 +101,23 @@ usage(argc,argv); } - for(lines=0,line=malloc(BUFSIZ);line && fgets(line,BUFSIZ,stdin);lines++,line=malloc(BUFSIZ)) { - size_t len = strlen(line); - msg_len+=len; - realloc(line, len+1); - message=realloc(message,sizeof(void*) * lines+1); - message[lines]=line; + char line[BUFSIZ]; + for(lines=0;fgets(line,BUFSIZ,stdin);lines++) { + msg_len += strlen(line); + message = realloc(message,sizeof(void*) * lines+1); + if (!message) { + fprintf(stderr,_("%s: OOM: %s\n"),argv[0],strerror(errno)); + exit(DEFERAL); + } else { + message[lines] = strdup(line); + if (!message[lines]) { + fprintf(stderr,_("%s: OOM: %s\n"),argv[0],strerror(errno)); + exit(DEFERAL); + } + } } - if(!line || !message) { + if(!message) { fprintf(stderr,_("%s: OOM: %s\n"),argv[0],strerror(errno)); exit(DEFERAL); }