# HG changeset patch # User Gerd Moellmann # Date 983537808 0 # Node ID ac3ee681e8f9d9a158114d6482be7d7759b11e46 # Parent 742df7c33f75382b27842173257c8ed9dc5aa643 (Fcurrent_time_zone) [HAVE_TM_ZONE || HAVE_TZNAME]: Accept only alphanumeric time zone names. diff -r 742df7c33f75 -r ac3ee681e8f9 src/editfns.c --- a/src/editfns.c Fri Mar 02 12:34:45 2001 +0000 +++ b/src/editfns.c Fri Mar 02 12:56:48 2001 +0000 @@ -1757,6 +1757,20 @@ s = tzname[t->tm_isdst]; #endif #endif /* not HAVE_TM_ZONE */ + +#if defined HAVE_TM_ZONE || defined HAVE_TZNAME + if (s) + { + /* On Japanese w32, we can get a Japanese string as time + zone name. Don't accept that. */ + char *p; + for (p = s; *p && isalnum (*p); ++p) + ; + if (p == s || *p) + s = NULL; + } +#endif + if (!s) { /* No local time zone name is available; use "+-NNNN" instead. */