[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 25dc0d1: ; Another protection from out-of-bounds access to it->st
From: |
Eli Zaretskii |
Subject: |
master 25dc0d1: ; Another protection from out-of-bounds access to it->stack[]. |
Date: |
Sun, 5 Dec 2021 11:05:03 -0500 (EST) |
branch: master
commit 25dc0d1de6e7770ff1109a434965fcff5202595d
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
; Another protection from out-of-bounds access to it->stack[].
---
src/xdisp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 45b5025..0ff6286 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -30289,7 +30289,8 @@ produce_stretch_glyph (struct it *it)
Compute the width of the characters having this `display'
property. */
struct it it2;
- Lisp_Object object = it->stack[it->sp - 1].string;
+ Lisp_Object object =
+ it->sp > 0 ? it->stack[it->sp - 1].string : it->string;
unsigned char *p = (STRINGP (object)
? SDATA (object) + IT_STRING_BYTEPOS (*it)
: BYTE_POS_ADDR (IT_BYTEPOS (*it)));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 25dc0d1: ; Another protection from out-of-bounds access to it->stack[].,
Eli Zaretskii <=