diff options
| author | Eli Zaretskii | 2026-01-24 12:54:30 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2026-01-24 12:54:30 +0200 |
| commit | f1b3343e3dcd5a2aa865a92cf6cf9e7efebb1a35 (patch) | |
| tree | d67cd1c77fba6cc39fbd4a693e32bd89ff1937a3 /src | |
| parent | aa352804afabd5df6bb275af3376343cfcb7b44c (diff) | |
| download | emacs-f1b3343e3dcd5a2aa865a92cf6cf9e7efebb1a35.tar.gz emacs-f1b3343e3dcd5a2aa865a92cf6cf9e7efebb1a35.zip | |
; Safer 'x-display-monitor-attributes-list'
* src/xfns.c (Fx_display_monitor_attributes_list): Don't access
more elements in monitor_frames than there are monitors reported
by 'gdk_display_get_n_monitors' or 'gdk_screen_get_n_monitors'.
(Bug#79941)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c index 70a4b6d5509..f960f36e24d 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -6648,7 +6648,8 @@ Internal use only, use `display-monitor-attributes-list' instead. */) | |||
| 6648 | #else | 6648 | #else |
| 6649 | i = gdk_screen_get_monitor_at_window (gscreen, gwin); | 6649 | i = gdk_screen_get_monitor_at_window (gscreen, gwin); |
| 6650 | #endif | 6650 | #endif |
| 6651 | ASET (monitor_frames, i, Fcons (frame, AREF (monitor_frames, i))); | 6651 | if (0 <= i && i < n_monitors) |
| 6652 | ASET (monitor_frames, i, Fcons (frame, AREF (monitor_frames, i))); | ||
| 6652 | } | 6653 | } |
| 6653 | } | 6654 | } |
| 6654 | 6655 | ||