diff options
author | is <is@pkgsrc.org> | 2013-02-28 19:21:03 +0000 |
---|---|---|
committer | is <is@pkgsrc.org> | 2013-02-28 19:21:03 +0000 |
commit | 00ffc413c688c1c04b267c2945824a48ee404f61 (patch) | |
tree | afabc670e067d5914652e96032c4c55c461c0ed3 /mail | |
parent | 8fb18bc9bd8a77477f837eee89469da69187259d (diff) | |
download | pkgsrc-00ffc413c688c1c04b267c2945824a48ee404f61.tar.gz |
Replace loop around mktemp() (without error return checking) and mkdir()
with mkdtemp(), thus eliminating endless loop in case TMPDIR points to
a plain file.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/mutt-devel/Makefile | 4 | ||||
-rw-r--r-- | mail/mutt-devel/distinfo | 3 | ||||
-rw-r--r-- | mail/mutt-devel/patches/patch-lib.c | 29 |
3 files changed, 33 insertions, 3 deletions
diff --git a/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile index a6c4c50395d..777bab5f9d0 100644 --- a/mail/mutt-devel/Makefile +++ b/mail/mutt-devel/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.89 2013/02/06 23:22:46 jperkin Exp $ +# $NetBSD: Makefile,v 1.90 2013/02/28 19:21:03 is Exp $ DISTNAME= mutt-1.5.21 -PKGREVISION= 7 +PKGREVISION= 8 CATEGORIES= mail MUTT_SITES= ftp://ftp.mutt.org/mutt/ \ ftp://ftp.stealth.net/pub/mirrors/ftp.mutt.org/pub/mutt/ \ diff --git a/mail/mutt-devel/distinfo b/mail/mutt-devel/distinfo index 8becd72c97f..72312738254 100644 --- a/mail/mutt-devel/distinfo +++ b/mail/mutt-devel/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.72 2012/03/12 14:35:58 wiz Exp $ +$NetBSD: distinfo,v 1.73 2013/02/28 19:21:03 is Exp $ SHA1 (mutt-1.5.21.tar.gz) = a8475f2618ce5d5d33bff85c0affdf21ab1d76b9 RMD160 (mutt-1.5.21.tar.gz) = b235a42972ae410592253cdc117a90baf279f47a @@ -23,3 +23,4 @@ SHA1 (patch-an) = b9cc3e957bb1650c8e22c0edf0ce112f769664a1 SHA1 (patch-ao) = a5dddb01d30f28337ca825c6461139c2d9f288d5 SHA1 (patch-ap) = c6f79d5c4e19efdc15e9d5a59934da52b16b7a62 SHA1 (patch-aq) = e363d8929ced9731a31af1137b111d3476a3d05d +SHA1 (patch-lib.c) = 7a0dc485ac8351b4c41279e22cf74134462c6432 diff --git a/mail/mutt-devel/patches/patch-lib.c b/mail/mutt-devel/patches/patch-lib.c new file mode 100644 index 00000000000..784595b9d64 --- /dev/null +++ b/mail/mutt-devel/patches/patch-lib.c @@ -0,0 +1,29 @@ +$NetBSD: patch-lib.c,v 1.1 2013/02/28 19:21:04 is Exp $ + +--- lib.c.orig 2013-02-28 15:59:08.000000000 +0000 ++++ lib.c +@@ -548,7 +548,6 @@ static int mutt_mkwrapdir (const char *p + const char *basename; + char parent[_POSIX_PATH_MAX]; + char *p; +- int rv; + + strfcpy (parent, NONULL (path), sizeof (parent)); + +@@ -563,14 +562,8 @@ static int mutt_mkwrapdir (const char *p + basename = path; + } + +- do +- { +- snprintf (newdir, ndlen, "%s/%s", parent, ".muttXXXXXX"); +- mktemp (newdir); +- } +- while ((rv = mkdir (newdir, 0700)) == -1 && errno == EEXIST); +- +- if (rv == -1) ++ snprintf (newdir, ndlen, "%s/%s", parent, ".muttXXXXXX"); ++ if (mkdtemp (newdir) == NULL) + return -1; + + snprintf (newfile, nflen, "%s/%s", newdir, NONULL(basename)); |