Update to 2.1.1:

Fix type mismatches regarding restricted lengths.  Problems noted
        by Jukka Salmi.
Fix bug #SF1743896 (reopened): Don't crash if a From: header with no
        domain is found.  Patch from Andy Fiddaman.
Fix bug #SF1771520: Return an error from dkim_policy() if the
        sender's domain name could not be determined.  Patch from
        Andy Fiddaman.
This commit is contained in:
Jukka Salmi 2007-08-14 13:36:23 +00:00 committed by Thomas Klausner
parent 2e1e8c19f3
commit ea90676d96
5 changed files with 11 additions and 78 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.14 2007/08/13 15:15:44 jukka Exp $
# $NetBSD: Makefile,v 1.15 2007/08/14 13:36:23 jukka Exp $
DISTNAME= dkim-milter-2.1.0
PKGREVISION= 2
DISTNAME= dkim-milter-2.1.1
#PKGREVISION= 2
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=dkim-milter/}

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.6 2007/08/09 14:37:20 jukka Exp $
@comment $NetBSD: PLIST,v 1.7 2007/08/14 13:36:23 jukka Exp $
${WITH_ARLIB}lib/libar.a
lib/libdkim.a
${WITH_ARLIB}man/man3/ar.3
@ -31,6 +31,8 @@ share/doc/dkim-milter/libdkim/dkim_eoh.html
share/doc/dkim-milter/libdkim/dkim_eom.html
share/doc/dkim-milter/libdkim/dkim_free.html
share/doc/dkim-milter/libdkim/dkim_get_user_context.html
share/doc/dkim-milter/libdkim/dkim_getpresult.html
share/doc/dkim-milter/libdkim/dkim_getpresultstr.html
share/doc/dkim-milter/libdkim/dkim_getsighdr.html
share/doc/dkim-milter/libdkim/dkim_getsiglist.html
share/doc/dkim-milter/libdkim/dkim_getsignature.html
@ -42,6 +44,7 @@ share/doc/dkim-milter/libdkim/dkim_options.html
share/doc/dkim-milter/libdkim/dkim_param_t.html
share/doc/dkim-milter/libdkim/dkim_policy.html
share/doc/dkim-milter/libdkim/dkim_policy_t.html
share/doc/dkim-milter/libdkim/dkim_presult.html
share/doc/dkim-milter/libdkim/dkim_query_t.html
share/doc/dkim-milter/libdkim/dkim_reportinfo.html
share/doc/dkim-milter/libdkim/dkim_set_dns_callback.html

View file

@ -1,10 +1,8 @@
$NetBSD: distinfo,v 1.12 2007/08/13 15:15:44 jukka Exp $
$NetBSD: distinfo,v 1.13 2007/08/14 13:36:23 jukka Exp $
SHA1 (dkim-milter-2.1.0.tar.gz) = 0253e1ceb58c2909540b77f0a22c889a817894a0
RMD160 (dkim-milter-2.1.0.tar.gz) = 7cc4243e26fd11e85562df7a5e756c8bf3132415
Size (dkim-milter-2.1.0.tar.gz) = 563370 bytes
SHA1 (dkim-milter-2.1.1.tar.gz) = bddee80deadf2fe1405196ad19c60e852ff7c7ec
RMD160 (dkim-milter-2.1.1.tar.gz) = d4acacb1a3b2cf658ec32a3921de4fa2ac7ff926
Size (dkim-milter-2.1.1.tar.gz) = 564757 bytes
SHA1 (patch-aa) = 0427254b4fdf3afac179c64ed3d6c75be46bc726
SHA1 (patch-ab) = 76c3232d6328a26f6e45df3ce4a9e37a55916d04
SHA1 (patch-ac) = a8d0069425c3e4c94d14b7f7f98e5c31f7dbc5b2
SHA1 (patch-ad) = 12b8170842d76ddff2ed6900bd73f9de4ad55669
SHA1 (patch-ae) = 4511a3ee2cc17ebbc55c8c4cf6c35516fd90ae6f

View file

@ -1,23 +0,0 @@
$NetBSD: patch-ad,v 1.5 2007/08/12 06:36:31 jukka Exp $
--- libdkim/dkim.c.orig 2007-08-10 10:48:50.000000000 +0200
+++ libdkim/dkim.c 2007-08-11 19:04:31.000000000 +0200
@@ -2816,7 +2816,7 @@ dkim_eom_verify(DKIM *dkim, bool *testke
status = rfc2822_mailbox_split(colon + 1, &user,
&domain);
- if (status != 0 && domain != NULL)
+ if (status != 0 || domain == NULL)
{
dkim_error(dkim, "%s header malformed",
DKIM_FROMHEADER);
@@ -3812,6 +3812,9 @@ dkim_policy(DKIM *dkim, bool *test, bool
if (dkim->dkim_mode == DKIM_MODE_SIGN)
return DKIM_STAT_INVALID;
+ if (dkim->dkim_domain == NULL)
+ return DKIM_STAT_CANTVRFY;
+
/* initialize */
*test = FALSE;
dkim->dkim_presult = DKIM_PRESULT_NONE;

View file

@ -1,45 +0,0 @@
$NetBSD: patch-ae,v 1.4 2007/08/13 15:15:44 jukka Exp $
--- libdkim/dkim-canon.h.orig 2007-07-02 07:44:06.000000000 +0200
+++ libdkim/dkim-canon.h 2007-08-13 17:07:26.000000000 +0200
@@ -18,7 +18,7 @@ static char dkim_canon_h_id[] = "@(#)$Id
/* prototypes */
extern DKIM_STAT dkim_add_canon __P((DKIM *, bool, dkim_canon_t, int,
u_char *, struct dkim_header *,
- size_t length, DKIM_CANON **cout));
+ off_t length, DKIM_CANON **cout));
extern DKIM_STAT dkim_canon_bodychunk __P((DKIM *, u_char *, size_t));
extern void dkim_canon_cleanup __P((DKIM *));
extern DKIM_STAT dkim_canon_closebody __P((DKIM *));
--- libdkim/dkim-canon.c.orig 2007-08-08 22:54:08.000000000 +0200
+++ libdkim/dkim-canon.c 2007-08-13 17:07:26.000000000 +0200
@@ -616,7 +616,7 @@ dkim_canon_cleanup(DKIM *dkim)
DKIM_STAT
dkim_add_canon(DKIM *dkim, bool hdr, dkim_canon_t canon, int hashtype,
u_char *hdrlist, struct dkim_header *sighdr,
- size_t length, DKIM_CANON **cout)
+ off_t length, DKIM_CANON **cout)
{
DKIM_CANON *cur;
DKIM_CANON *new;
@@ -1080,7 +1080,7 @@ dkim_canon_signature(DKIM *dkim, struct
DKIM_STAT
dkim_canon_bodychunk(DKIM *dkim, u_char *buf, size_t buflen)
{
- size_t remain;
+ off_t remain;
u_int wlen;
DKIM_CANON *cur;
u_char *p;
@@ -1101,7 +1101,10 @@ dkim_canon_bodychunk(DKIM *dkim, u_char
if (cur->canon_remain == 0)
continue;
- remain = MIN(buflen, cur->canon_remain);
+ if (cur->canon_remain == (off_t) -1)
+ remain = buflen;
+ else
+ remain = MIN(buflen, cur->canon_remain);
eob = buf + remain - 1;
wrote = buf;