Commit df1f27af authored by Paul Eggert's avatar Paul Eggert
Browse files

* xdisp.c (display_mode_element): Don't assume strlen fits in int.

parent 4eab31dd
......@@ -4,6 +4,7 @@
not unsigned long, as we prefer signed integers. All callers changed.
Detect integer overflow in repeat count.
(message_dolog): Don't assume print length fits in 39 bytes.
(display_mode_element): Don't assume strlen fits in int.
* termcap.c: Don't assume sizes fit in int and never overflow.
(struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
......
......@@ -18730,8 +18730,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
break;
case MODE_LINE_STRING:
{
int len = strlen (spec);
Lisp_Object tem = make_string (spec, len);
Lisp_Object tem = build_string (spec);
props = Ftext_properties_at (make_number (charpos), elt);
/* Should only keep face property in props */
n += store_mode_line_string (NULL, tem, 0, field, prec, props);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment