diff options
| author | Gerd Moellmann | 2001-03-02 12:57:16 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-03-02 12:57:16 +0000 |
| commit | cda0f4da7b5289c0e05fd7b6186d8ea28e4eb7ba (patch) | |
| tree | 95f1999408fcfff543b9fa3eb68347f0ad51cd90 | |
| parent | 1727db8c85c00fca94aff36d94439219531c6f66 (diff) | |
| download | emacs-cda0f4da7b5289c0e05fd7b6186d8ea28e4eb7ba.tar.gz emacs-cda0f4da7b5289c0e05fd7b6186d8ea28e4eb7ba.zip | |
(Fcurrent_time_zone) [HAVE_TM_ZONE || HAVE_TZNAME]:
Accept only alphanumeric time zone names.
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/editfns.c | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 135969d183f..8f2c832b3ac 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2001-03-02 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-03-02 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * editfns.c (Fcurrent_time_zone) [HAVE_TM_ZONE || HAVE_TZNAME]: | ||
| 4 | Accept only alphanumeric time zone names. | ||
| 5 | |||
| 3 | * xterm.c (XTset_vertical_scroll_bar): Don't clear a zero height | 6 | * xterm.c (XTset_vertical_scroll_bar): Don't clear a zero height |
| 4 | or width area. | 7 | or width area. |
| 5 | (XTset_vertical_scroll_bar, x_scroll_bar_create): Don't configure | 8 | (XTset_vertical_scroll_bar, x_scroll_bar_create): Don't configure |
diff --git a/src/editfns.c b/src/editfns.c index 2f5e3f711ea..d8f03114b4e 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1757,6 +1757,20 @@ the data it can't find.") | |||
| 1757 | s = tzname[t->tm_isdst]; | 1757 | s = tzname[t->tm_isdst]; |
| 1758 | #endif | 1758 | #endif |
| 1759 | #endif /* not HAVE_TM_ZONE */ | 1759 | #endif /* not HAVE_TM_ZONE */ |
| 1760 | |||
| 1761 | #if defined HAVE_TM_ZONE || defined HAVE_TZNAME | ||
| 1762 | if (s) | ||
| 1763 | { | ||
| 1764 | /* On Japanese w32, we can get a Japanese string as time | ||
| 1765 | zone name. Don't accept that. */ | ||
| 1766 | char *p; | ||
| 1767 | for (p = s; *p && isalnum (*p); ++p) | ||
| 1768 | ; | ||
| 1769 | if (p == s || *p) | ||
| 1770 | s = NULL; | ||
| 1771 | } | ||
| 1772 | #endif | ||
| 1773 | |||
| 1760 | if (!s) | 1774 | if (!s) |
| 1761 | { | 1775 | { |
| 1762 | /* No local time zone name is available; use "+-NNNN" instead. */ | 1776 | /* No local time zone name is available; use "+-NNNN" instead. */ |