aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mutt-devel
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2004-05-11 15:36:58 +0800
committerkrion <krion@FreeBSD.org>2004-05-11 15:36:58 +0800
commit9f4b5b20ee478710dcdb1ed8038b3c468c751bbd (patch)
treefdac8b5d5e11418527c02812eb2a2da4dce44a22 /mail/mutt-devel
parent12689ee86672212e4fa3b600b289c7dfa5bec9b1 (diff)
downloadfreebsd-ports-gnome-9f4b5b20ee478710dcdb1ed8038b3c468c751bbd.tar.gz
freebsd-ports-gnome-9f4b5b20ee478710dcdb1ed8038b3c468c751bbd.tar.zst
freebsd-ports-gnome-9f4b5b20ee478710dcdb1ed8038b3c468c751bbd.zip
- Fix the tmpfile patch to really include the right bounds for
snprintf() and strncat(). PR: ports/66508 Submitted by: maintainer
Diffstat (limited to 'mail/mutt-devel')
-rw-r--r--mail/mutt-devel/files/patch-mktemp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mail/mutt-devel/files/patch-mktemp b/mail/mutt-devel/files/patch-mktemp
index bb02ae52e2f7..8a3d717ba0d4 100644
--- a/mail/mutt-devel/files/patch-mktemp
+++ b/mail/mutt-devel/files/patch-mktemp
@@ -7,9 +7,9 @@
- snprintf (s, _POSIX_PATH_MAX, "%s/mutt-%s-%d-%d", NONULL (Tempdir), NONULL(Hostname), (int) getpid (), Counter++);
+ char t[7];
+ snprintf (t, 7, "-%05d", Counter++);
-+ snprintf (s, _POSIX_PATH_MAX-7, "%s/mutt-%s-XXXXXXXX", NONULL(Tempdir), NONULL(Hostname));
++ snprintf (s, _POSIX_PATH_MAX-6, "%s/mutt-%s-XXXXXXXX", NONULL(Tempdir), NONULL(Hostname));
+ mktemp (s);
-+ strncat(s, t, _POSIX_PATH_MAX);
++ strncat(s, t, 6);
dprint (1, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s));
unlink (s);
}