c9baf6
--- mc-4.8.6.orig/src/vfs/smbfs/helpers/lib/time.c	2012-08-27 09:48:27.000000000 +0200
c9baf6
+++ mc-4.8.6.orig/src/vfs/smbfs/helpers/lib/time.c	2013-02-19 18:38:53.592051702 +0100
c9baf6
@@ -173,12 +173,14 @@ TimeZoneFaster (time_t t)
c9baf6
             dst_table[i].start = dst_table[i].end = t;
c9baf6
 
c9baf6
             /* no entry will cover more than 6 months */
c9baf6
-            low = t - MAX_DST_WIDTH / 2;
c9baf6
-            if (t < low)
c9baf6
+            if (t > TIME_T_MIN + MAX_DST_WIDTH / 2)
c9baf6
+                low = t - MAX_DST_WIDTH / 2;
c9baf6
+            else
c9baf6
                 low = TIME_T_MIN;
c9baf6
 
c9baf6
-            high = t + MAX_DST_WIDTH / 2;
c9baf6
-            if (high < t)
c9baf6
+            if (t < TIME_T_MAX - MAX_DST_WIDTH / 2)
c9baf6
+                high = t + MAX_DST_WIDTH / 2;
c9baf6
+            else
c9baf6
                 high = TIME_T_MAX;
c9baf6
 
c9baf6
             /* widen the new entry using two bisection searches */