summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald van Dijk <truedfx@gentoo.org>2007-07-05 21:42:35 +0000
committerHarald van Dijk <truedfx@gentoo.org>2007-07-05 21:42:35 +0000
commiteb60055161ef2728dbf21fbe6d33d329c79ec7d3 (patch)
tree3e71847c1a78ca160dc29547b923c445a778253b /app-misc/mc/files
parentia64/x86 stable (diff)
downloadgentoo-2-eb60055161ef2728dbf21fbe6d33d329c79ec7d3.tar.gz
gentoo-2-eb60055161ef2728dbf21fbe6d33d329c79ec7d3.tar.bz2
gentoo-2-eb60055161ef2728dbf21fbe6d33d329c79ec7d3.zip
Report invalid mtimes without crashing (#184296)
(Portage version: 2.1.3_rc6)
Diffstat (limited to 'app-misc/mc/files')
-rw-r--r--app-misc/mc/files/digest-mc-4.6.1-r49
-rw-r--r--app-misc/mc/files/mc-4.6.1-invalid-mtime.patch30
2 files changed, 39 insertions, 0 deletions
diff --git a/app-misc/mc/files/digest-mc-4.6.1-r4 b/app-misc/mc/files/digest-mc-4.6.1-r4
new file mode 100644
index 000000000000..1bb42318c1b6
--- /dev/null
+++ b/app-misc/mc/files/digest-mc-4.6.1-r4
@@ -0,0 +1,9 @@
+MD5 f90bffe7f51883e818143dc2077eb98f mc-4.6.1-utf8-r2.patch.bz2 30449
+RMD160 ffe89eb0cef217ba87398c93b65ebc0e5fefac5d mc-4.6.1-utf8-r2.patch.bz2 30449
+SHA256 f58de9e412694958c00c7ef831995f2b56b7add7ea1e26567281516db02f483e mc-4.6.1-utf8-r2.patch.bz2 30449
+MD5 18b20db6e40480a53bac2870c56fc3c4 mc-4.6.1.tar.gz 3928370
+RMD160 d565ee95a8916d73fad5e0defeb9f2f57e50962b mc-4.6.1.tar.gz 3928370
+SHA256 086ab03daaac28a28c0ddb9a709040b59e1322f6bfa68e39d004d9c66b119e7e mc-4.6.1.tar.gz 3928370
+MD5 d63ffd21654bfa965b5c19b845cb7b34 u7z-4.29.tar.bz2 2951
+RMD160 1ab0cfea1563e81bdde9c0552d37efe710ea14bf u7z-4.29.tar.bz2 2951
+SHA256 0d046e76fade7c7e31be01626bb3fcb0afcb5f62809733d0c70e0e12c655348d u7z-4.29.tar.bz2 2951
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 000000000000..07b1f6d1c169
--- /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;
+ }
+