Remove incorrect 'free()' from libspamc.c (used in 'spamc'). Patch copied

from stable branch of SA CVS repository.

On other operating systems 'spamc' was reported to cause a core dump if
'spamd' was not running. At least NetBSD/i386 1.5.3 seems not to be as
severely affected, I only got 'spamc in free(): warning: junk
pointer, too high to make sense.'.
This commit is contained in:
heinz 2003-02-09 02:27:54 +00:00
parent 5aa046ef45
commit fce90a9f2c
2 changed files with 14 additions and 2 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.17 2003/02/02 19:38:39 heinz Exp $
# $NetBSD: Makefile,v 1.18 2003/02/09 02:27:54 heinz Exp $
DISTNAME= Mail-SpamAssassin-2.44
PKGNAME= spamassassin-2.44
PKGREVISION= # empty
PKGREVISION= 1
SVR4_PKGNAME= sa
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Mail/} \

View file

@ -0,0 +1,12 @@
$NetBSD: patch-ai,v 1.1 2003/02/09 02:27:54 heinz Exp $
--- spamd/libspamc.c.orig Fri Jan 31 15:49:03 2003
+++ spamd/libspamc.c
@@ -371,7 +371,6 @@
if(i<0 || len >= bufsiz){ free(m->out); m->out=m->msg; m->out_len=m->msg_len; return EX_OSERR; }
if((i=try_to_connect(addr, &sock))!=EX_OK){
- free(buf);
free(m->out); m->out=m->msg; m->out_len=m->msg_len;
return i;
}