diff options
author | root <root@evil.(none)> | 2009-06-10 01:24:48 +0300 |
---|---|---|
committer | root <root@evil.(none)> | 2009-06-10 01:24:48 +0300 |
commit | c8f9ea324922b8264726938021e3dafc1d1c42d0 (patch) | |
tree | 7ef3dd3d27e3211fe39e24346c2a0609fae15b74 /app-misc/mc/files/mc-4.6.1-invalid-mtime.patch | |
parent | 04165476be4a4d33ced17c20fcb0b97f30c0910c (diff) |
new file: app-misc/mc/mc-4.9999.ebuild (Midnight Commander from git)
new file: net-dialup/openl2tp/openl2tp-1.4.ebuild (openl2tp)
Diffstat (limited to 'app-misc/mc/files/mc-4.6.1-invalid-mtime.patch')
-rw-r--r-- | app-misc/mc/files/mc-4.6.1-invalid-mtime.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app-misc/mc/files/mc-4.6.1-invalid-mtime.patch b/app-misc/mc/files/mc-4.6.1-invalid-mtime.patch new file mode 100644 index 0000000..07b1f6d --- /dev/null +++ b/app-misc/mc/files/mc-4.6.1-invalid-mtime.patch @@ -0,0 +1,30 @@ + + Invalid timestamps on files caused mc to segfault by passing a null + pointer to strftime. Avoid trying to print the time in this case. + + Reported by Maxim Britov <maxim@office.modum.by> + at http://bugs.gentoo.org/184296 + +--- mc-4.6.1/src/util.c ++++ mc-4.6.1/src/util.c +@@ -717,6 +717,7 @@ + static size_t i18n_timelength = 0; + static const char *fmtyear, *fmttime; + const char *fmt; ++ struct tm *whentm; + + if (i18n_timelength == 0){ + i18n_timelength = i18n_checktimelength() + 1; +@@ -740,7 +741,11 @@ + else + fmt = fmttime; + +- strftime (timebuf, i18n_timelength, fmt, localtime(&when)); ++ whentm = localtime(&when); ++ if (whentm == NULL) ++ return "(invalid)"; ++ ++ strftime (timebuf, i18n_timelength, fmt, whentm); + return timebuf; + } + |