diff options
author | krion <krion@FreeBSD.org> | 2004-05-11 15:36:58 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-05-11 15:36:58 +0800 |
commit | 9f4b5b20ee478710dcdb1ed8038b3c468c751bbd (patch) | |
tree | fdac8b5d5e11418527c02812eb2a2da4dce44a22 /mail/mutt-devel | |
parent | 12689ee86672212e4fa3b600b289c7dfa5bec9b1 (diff) | |
download | freebsd-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-mktemp | 4 |
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); } |