diff options
| author | Eli Zaretskii | 2021-12-05 18:03:40 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-12-05 18:03:40 +0200 |
| commit | 25dc0d1de6e7770ff1109a434965fcff5202595d (patch) | |
| tree | f90da22cc8756239b6a2b93384ced1dcdd85cd29 /src | |
| parent | 509dec902c45bc11cd8ff6664795b471d451742c (diff) | |
| download | emacs-25dc0d1de6e7770ff1109a434965fcff5202595d.tar.gz emacs-25dc0d1de6e7770ff1109a434965fcff5202595d.zip | |
; Another protection from out-of-bounds access to it->stack[].
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 45b502590d1..0ff6286af74 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -30289,7 +30289,8 @@ produce_stretch_glyph (struct it *it) | |||
| 30289 | Compute the width of the characters having this `display' | 30289 | Compute the width of the characters having this `display' |
| 30290 | property. */ | 30290 | property. */ |
| 30291 | struct it it2; | 30291 | struct it it2; |
| 30292 | Lisp_Object object = it->stack[it->sp - 1].string; | 30292 | Lisp_Object object = |
| 30293 | it->sp > 0 ? it->stack[it->sp - 1].string : it->string; | ||
| 30293 | unsigned char *p = (STRINGP (object) | 30294 | unsigned char *p = (STRINGP (object) |
| 30294 | ? SDATA (object) + IT_STRING_BYTEPOS (*it) | 30295 | ? SDATA (object) + IT_STRING_BYTEPOS (*it) |
| 30295 | : BYTE_POS_ADDR (IT_BYTEPOS (*it))); | 30296 | : BYTE_POS_ADDR (IT_BYTEPOS (*it))); |