diff options
| author | Paul Eggert | 2011-06-20 18:30:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-20 18:30:32 -0700 |
| commit | df1f27af9e60e8f223cce0f5e5ac4107d87f982e (patch) | |
| tree | e7dccdf4d60605dd12a68518f5aa3095005a005e /src | |
| parent | 4eab31dd61e80ac5b38b964c91577e0c855e1432 (diff) | |
| download | emacs-df1f27af9e60e8f223cce0f5e5ac4107d87f982e.tar.gz emacs-df1f27af9e60e8f223cce0f5e5ac4107d87f982e.zip | |
* xdisp.c (display_mode_element): Don't assume strlen fits in int.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bcff6fd0831..8c530340927 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | not unsigned long, as we prefer signed integers. All callers changed. | 4 | not unsigned long, as we prefer signed integers. All callers changed. |
| 5 | Detect integer overflow in repeat count. | 5 | Detect integer overflow in repeat count. |
| 6 | (message_dolog): Don't assume print length fits in 39 bytes. | 6 | (message_dolog): Don't assume print length fits in 39 bytes. |
| 7 | (display_mode_element): Don't assume strlen fits in int. | ||
| 7 | 8 | ||
| 8 | * termcap.c: Don't assume sizes fit in int and never overflow. | 9 | * termcap.c: Don't assume sizes fit in int and never overflow. |
| 9 | (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes. | 10 | (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes. |
diff --git a/src/xdisp.c b/src/xdisp.c index ce60b658a73..ae5c334447d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -18730,8 +18730,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 18730 | break; | 18730 | break; |
| 18731 | case MODE_LINE_STRING: | 18731 | case MODE_LINE_STRING: |
| 18732 | { | 18732 | { |
| 18733 | int len = strlen (spec); | 18733 | Lisp_Object tem = build_string (spec); |
| 18734 | Lisp_Object tem = make_string (spec, len); | ||
| 18735 | props = Ftext_properties_at (make_number (charpos), elt); | 18734 | props = Ftext_properties_at (make_number (charpos), elt); |
| 18736 | /* Should only keep face property in props */ | 18735 | /* Should only keep face property in props */ |
| 18737 | n += store_mode_line_string (NULL, tem, 0, field, prec, props); | 18736 | n += store_mode_line_string (NULL, tem, 0, field, prec, props); |