Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
6b21de18
Commit
6b21de18
authored
Nov 23, 2011
by
Chong Yidong
Browse files
* xdisp.c (compute_stop_pos): Check validity of end_charpos before using it.
Fixes: debbugs:5984
parent
e37df674
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
src/ChangeLog
src/ChangeLog
+5
-0
src/xdisp.c
src/xdisp.c
+7
-3
No files found.
src/ChangeLog
View file @
6b21de18
2011-11-23 Chong Yidong <cyd@gnu.org>
* xdisp.c (compute_stop_pos): Check validity of end_charpos before
using it (Bug#5984).
2011-11-22 Eli Zaretskii <eliz@gnu.org>
* dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
...
...
src/xdisp.c
View file @
6b21de18
...
...
@@ -3166,13 +3166,11 @@ compute_stop_pos (struct it *it)
Lisp_Object object, limit, position;
EMACS_INT charpos, bytepos;
/* If nowhere else, stop at the end. */
it->stop_charpos = it->end_charpos;
if (STRINGP (it->string))
{
/* Strings are usually short, so don't limit the search for
properties. */
it->stop_charpos = it->end_charpos;
object = it->string;
limit = Qnil;
charpos = IT_STRING_CHARPOS (*it);
...
...
@@ -3182,6 +3180,12 @@ compute_stop_pos (struct it *it)
{
EMACS_INT pos;
/* If end_charpos is out of range for some reason, such as a
misbehaving display function, rationalize it (Bug#5984). */
if (it->end_charpos > ZV)
it->end_charpos = ZV;
it->stop_charpos = it->end_charpos;
/* If next overlay change is in front of the current stop pos
(which is IT->end_charpos), stop there. Note: value of
next_overlay_change is point-max if no overlay change
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment