pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/40548: mail/mutt-devel crash after 64bit time_t branch is merged.
On Feb 3, 1:05pm, nonakap%gmail.com@localhost (nonakap%gmail.com@localhost)
wrote:
-- Subject: pkg/40548: mail/mutt-devel crash after 64bit time_t branch is mer
| >Number: 40548
| >Category: pkg
| >Synopsis: mail/mutt-devel crash after 64bit time_t branch is merged.
| >Confidential: no
| >Severity: serious
| >Priority: medium
| >Responsible: pkg-manager
| >State: open
| >Class: sw-bug
| >Submitter-Id: net
| >Arrival-Date: Tue Feb 03 13:05:00 +0000 2009
| >Originator: NONAKA Kimihiro
| >Release: NetBSD 5.99.7
| >Organization:
| >Environment:
| NetBSD koharu.myhome.local 5.99.7 NetBSD 5.99.7 (TPX61) #1467: Tue Feb 3
01:51:53 JST 2009
nonaka%koharu.myhome.local@localhost:/usr/src/sys/arch/i386/compile/TPX61 i386
|
| >Description:
| mail/mutt-devel crash after 64bit time_t branch is merged.
|
| >How-To-Repeat:
| Mail is moved or is copied by using Maildir.
|
| >Fix:
| --- mh.c.orig 2009-02-03 21:54:23.000000000 +0900
| +++ mh.c 2009-02-03 21:54:58.000000000 +0900
| @@ -1242,7 +1242,7 @@
| omask = umask (mh_umask (dest));
| FOREVER
| {
| - snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s",
| + snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%lld.%u_%d.%s%s",
| dest->path, subdir, time (NULL), (unsigned int)getpid (),
| Counter++, NONULL (Hostname), suffix);
|
| @@ -1328,7 +1328,7 @@
| /* construct a new file name. */
| FOREVER
| {
| - snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir,
| + snprintf (path, _POSIX_PATH_MAX, "%s/%lld.%u_%d.%s%s", subdir,
| time (NULL), (unsigned int)getpid (), Counter++,
| NONULL (Hostname), suffix);
| snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
You need casts to long long in the return of time, so that it works on
all the platforms.
christos
Home |
Main Index |
Thread Index |
Old Index