1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-11 16:08:13 +00:00

(Fcurrent_time_zone) [HAVE_TM_ZONE || HAVE_TZNAME]:

Accept only alphanumeric time zone names.
This commit is contained in:
Gerd Moellmann 2001-03-02 12:57:16 +00:00
parent 1727db8c85
commit cda0f4da7b
2 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2001-03-02 Gerd Moellmann <gerd@gnu.org>
* editfns.c (Fcurrent_time_zone) [HAVE_TM_ZONE || HAVE_TZNAME]:
Accept only alphanumeric time zone names.
* xterm.c (XTset_vertical_scroll_bar): Don't clear a zero height
or width area.
(XTset_vertical_scroll_bar, x_scroll_bar_create): Don't configure

View File

@ -1757,6 +1757,20 @@ the data it can't find.")
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. */