pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/abook Add a patch from abook CVS to fix stri...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/36628d362565
branches:  trunk
changeset: 478666:36628d362565
user:      kim <kim%pkgsrc.org@localhost>
date:      Wed Jul 28 02:50:22 2004 +0000

description:
Add a patch from abook CVS to fix string truncation in mutt import filter.

diffstat:

 databases/abook/Makefile         |   3 ++-
 databases/abook/distinfo         |   3 ++-
 databases/abook/patches/patch-aa |  40 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 2 deletions(-)

diffs (67 lines):

diff -r 72bcec469afb -r 36628d362565 databases/abook/Makefile
--- a/databases/abook/Makefile  Wed Jul 28 02:47:34 2004 +0000
+++ b/databases/abook/Makefile  Wed Jul 28 02:50:22 2004 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2004/06/28 19:23:53 minskim Exp $
+# $NetBSD: Makefile,v 1.9 2004/07/28 02:50:22 kim Exp $
 #
 
 DISTNAME=      abook-0.5.2
+PKGREVISION=   1
 CATEGORIES=    databases
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=abook/}
 
diff -r 72bcec469afb -r 36628d362565 databases/abook/distinfo
--- a/databases/abook/distinfo  Wed Jul 28 02:47:34 2004 +0000
+++ b/databases/abook/distinfo  Wed Jul 28 02:50:22 2004 +0000
@@ -1,4 +1,5 @@
-$NetBSD: distinfo,v 1.3 2004/06/28 19:22:38 minskim Exp $
+$NetBSD: distinfo,v 1.4 2004/07/28 02:50:22 kim Exp $
 
 SHA1 (abook-0.5.2.tar.gz) = 08f7382bd1a085172c9471922bcc984aa131eb80
 Size (abook-0.5.2.tar.gz) = 183852 bytes
+SHA1 (patch-aa) = 3135f0899056ea540bdf76c0bc583e48696af6fb
diff -r 72bcec469afb -r 36628d362565 databases/abook/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/abook/patches/patch-aa  Wed Jul 28 02:50:22 2004 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-aa,v 1.1 2004/07/28 02:50:22 kim Exp $
+
+--- filter.c   2004/01/23 07:14:32     1.29
++++ filter.c   2004/03/25 18:19:38     1.30
+@@ -1,6 +1,6 @@
+ 
+ /*
+- * $Id: patch-aa,v 1.1 2004/07/28 02:50:22 kim Exp $
++ * $Id: patch-aa,v 1.1 2004/07/28 02:50:22 kim Exp $
+  *
+  * by JH <jheinonen%users.sourceforge.net@localhost>
+  *
+@@ -618,6 +618,7 @@
+ mutt_read_line(FILE *in, char **alias, char **rest)
+ {
+       char *line, *ptr, *tmp;
++      size_t alias_len;
+ 
+       if( !(line = ptr = getaline(in)) )
+               return 1; /* error / EOF */
+@@ -640,13 +641,16 @@
+       while( ! ISSPACE(*ptr) )
+               ptr++;
+ 
+-      if( (*alias = (char *)malloc(ptr - tmp)) == NULL) {
++      /* includes also the trailing zero */
++      alias_len = (size_t)(ptr - tmp + 1);
++
++      if( (*alias = (char *)malloc(alias_len)) == NULL) {
+               free(line);
+               return 1;
+       }
+ 
+-      strncpy(*alias, tmp, ptr - tmp - 1);
+-      *(*alias + (ptr - tmp - 1)) = 0;
++      strncpy(*alias, tmp, alias_len - 1);
++      *(*alias + alias_len - 1) = 0;
+ 
+       while(ISSPACE(*ptr))
+               ptr++;



Home | Main Index | Thread Index | Old Index