aboutsummaryrefslogtreecommitdiffstats
path: root/src/composite.c
diff options
context:
space:
mode:
authorPaul Eggert2011-06-15 12:57:25 -0700
committerPaul Eggert2011-06-15 12:57:25 -0700
commita7af7fdede602a111401c2352e81311a9dc38b99 (patch)
treedaebcb8a73345231337d0a461c01ae7804b2b646 /src/composite.c
parent8c9b210626493dd93f236d7fb312c4f6dba62892 (diff)
parentb1c46f026de9d185ba86ffb1b23c50f2bd095ccf (diff)
downloademacs-a7af7fdede602a111401c2352e81311a9dc38b99.tar.gz
emacs-a7af7fdede602a111401c2352e81311a9dc38b99.zip
Integer overflow and signedness fixes (Bug#8873).
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/composite.c b/src/composite.c
index ab9ec3f5a03..51b7669cb4f 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -858,7 +858,7 @@ fill_gstring_body (Lisp_Object gstring)
858 for (i = 0; i < len; i++) 858 for (i = 0; i < len; i++)
859 { 859 {
860 Lisp_Object g = LGSTRING_GLYPH (gstring, i); 860 Lisp_Object g = LGSTRING_GLYPH (gstring, i);
861 EMACS_INT c = XINT (AREF (header, i + 1)); 861 int c = XFASTINT (AREF (header, i + 1));
862 862
863 if (NILP (g)) 863 if (NILP (g))
864 { 864 {
@@ -995,7 +995,8 @@ static int _work_char;
995void 995void
996composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT endpos, Lisp_Object string) 996composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT endpos, Lisp_Object string)
997{ 997{
998 EMACS_INT start, end, c; 998 EMACS_INT start, end;
999 int c;
999 Lisp_Object prop, val; 1000 Lisp_Object prop, val;
1000 /* This is from forward_to_next_line_start in xdisp.c. */ 1001 /* This is from forward_to_next_line_start in xdisp.c. */
1001 const int MAX_NEWLINE_DISTANCE = 500; 1002 const int MAX_NEWLINE_DISTANCE = 500;