[Debian-tex-commits] SVN tetex-bin commit + diffs: r2226 - in
tetex-bin/trunk/debian: . patches
Hilmar Preuße
hilmar-guest at alioth.debian.org
Fri Jan 5 18:26:42 CET 2007
Author: hilmar-guest
Date: 2007-01-05 18:26:41 +0100 (Fri, 05 Jan 2007)
New Revision: 2226
Added:
tetex-bin/trunk/debian/patches/patch-dvipdfm-timezone-crash
Modified:
tetex-bin/trunk/debian/changelog
tetex-bin/trunk/debian/patches/README.patches
tetex-bin/trunk/debian/patches/series
Log:
dvipdfm half hour crash
Modified: tetex-bin/trunk/debian/changelog
===================================================================
--- tetex-bin/trunk/debian/changelog 2007-01-05 11:14:01 UTC (rev 2225)
+++ tetex-bin/trunk/debian/changelog 2007-01-05 17:26:41 UTC (rev 2226)
@@ -4,6 +4,9 @@
texconfig to handle more paper sizes for dvipdfm, dvips and pdftex.
This will allow to let a libpaper hook set the default paper size with
texconfig.
+ * Apply a patch from upstream (Mark A. Wicks) to prevent dvipdfm from
+ crashing when called in a time zone having an offset from GMT, which is
+ not an integer number. (Closes: #291438) [hilmar]
-- Frank Küster <frank at debian.org> Thu, 14 Dec 2006 21:01:07 +0100
Modified: tetex-bin/trunk/debian/patches/README.patches
===================================================================
--- tetex-bin/trunk/debian/patches/README.patches 2007-01-05 11:14:01 UTC (rev 2225)
+++ tetex-bin/trunk/debian/patches/README.patches 2007-01-05 17:26:41 UTC (rev 2226)
@@ -167,3 +167,8 @@
=================
Use libpoppler instead of xpdf code
+14. patch-dvipdfm-timezone-crash
+================================
+a patch from upstream (Mark A. Wicks) to prevent dvipdfm from crashing
+when called in a time zone having an offset from GMT, which is not an
+integer number.
\ No newline at end of file
Added: tetex-bin/trunk/debian/patches/patch-dvipdfm-timezone-crash
===================================================================
--- tetex-bin/trunk/debian/patches/patch-dvipdfm-timezone-crash 2007-01-05 11:14:01 UTC (rev 2225)
+++ tetex-bin/trunk/debian/patches/patch-dvipdfm-timezone-crash 2007-01-05 17:26:41 UTC (rev 2226)
@@ -0,0 +1,50 @@
+--- tetex-bin-3.0/texk/dvipdfm/pdfdoc.c.orig 2003-01-28 00:18:05.000000000 +0100
++++ tetex-bin-3.0/texk/dvipdfm/pdfdoc.c 2007-01-05 16:29:14.000000000 +0100
+@@ -232,13 +232,7 @@
+
+ static char *asn_date (void)
+ {
+-#ifndef HAVE_TIMEZONE
+- #ifdef TM_GM_TOFF
+- #define timezone (bdtime->gm_toff)
+- #else
+- #define timezone 0l
+-#endif /* TM_GM_TOFF */
+-#endif /* HAVE_TIMEZONE */
++ long tz_offset;
+ static char date_string[24];
+ time_t current_time;
+ struct tm *bd_time;
+@@ -247,10 +241,28 @@
+ }
+ time(¤t_time);
+ bd_time = localtime(¤t_time);
+- sprintf (date_string, "D:%04d%02d%02d%02d%02d%02d%+03ld'%02ld'",
+- bd_time -> tm_year+1900, bd_time -> tm_mon+1, bd_time -> tm_mday,
+- bd_time -> tm_hour, bd_time -> tm_min, bd_time -> tm_sec,
+- -timezone/3600, timezone%3600);
++
++#ifdef HAVE_TM_GMTOFF /* Preferred way to get time zone offset */
++ tz_offset = bd_time->tm_gmtoff;
++#else
++#ifdef HAVE_TIMEZONE /* Plan B --- use external variable 'timezone'
++ /* (may not provide correct offset for daylight savings time) */
++ tz_offset = - timezone;
++#else /* Last resort --- without more information, set offset to zero */
++ tz_offset = 0l;
++#endif /* HAVE_TIMEZONE */
++#endif /* HAVE_TM_GMTOFF */
++
++ if (tz_offset == 0l) {
++ sprintf (date_string, "D:%04d%02d%02d%02d%02d%02dZ00'00'",
++ bd_time -> tm_year+1900, bd_time -> tm_mon+1, bd_time -> tm_mday,
++ bd_time -> tm_hour, bd_time -> tm_min, bd_time -> tm_sec);
++ } else {
++ sprintf (date_string, "D:%04d%02d%02d%02d%02d%02d%c%02ld'%02ld'",
++ bd_time -> tm_year+1900, bd_time -> tm_mon+1, bd_time -> tm_mday,
++ bd_time -> tm_hour, bd_time -> tm_min, bd_time -> tm_sec,
++ (tz_offset>0)? '+':'-', abs(tz_offset)/3600, (abs(tz_offset)/60)%60);
++ }
+ return date_string;
+ }
+
Modified: tetex-bin/trunk/debian/patches/series
===================================================================
--- tetex-bin/trunk/debian/patches/series 2007-01-05 11:14:01 UTC (rev 2225)
+++ tetex-bin/trunk/debian/patches/series 2007-01-05 17:26:41 UTC (rev 2226)
@@ -14,3 +14,4 @@
patch-a2ping_invocation
patch-pdftex-ttftable
patch-pdftex-cjkfonts-overflow
+patch-dvipdfm-timezone-crash
More information about the Debian-tex-commits
mailing list