mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-08 04:30:45 -08:00
Avoid more integer overflows on string size calculations.
* category.c (Fmake_category_set): * xdisp.c (get_overlay_arrow_glyph_row): * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
This commit is contained in:
parent
b98b1a831b
commit
3e67a981c4
4 changed files with 8 additions and 3 deletions
|
|
@ -16,6 +16,11 @@
|
|||
(x_clipboard_manager_save_all):
|
||||
* xterm.c (x_term_init): Use build_local_string.
|
||||
|
||||
Avoid more integer overflows on string size calculations.
|
||||
* category.c (Fmake_category_set):
|
||||
* xdisp.c (get_overlay_arrow_glyph_row):
|
||||
* w32font.c (intern_font_name): Prefer ptrdiff_t to int.
|
||||
|
||||
2014-09-15 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ those categories. */)
|
|||
(Lisp_Object categories)
|
||||
{
|
||||
Lisp_Object val;
|
||||
int len;
|
||||
ptrdiff_t len;
|
||||
|
||||
CHECK_STRING (categories);
|
||||
val = MAKE_CATEGORY_SET;
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ Lisp_Object
|
|||
intern_font_name (char * string)
|
||||
{
|
||||
Lisp_Object str = DECODE_SYSTEM (build_string (string));
|
||||
int len = SCHARS (str);
|
||||
ptrdiff_t len = SCHARS (str);
|
||||
Lisp_Object obarray = check_obarray (Vobarray);
|
||||
Lisp_Object tem = oblookup (obarray, SDATA (str), len, len);
|
||||
/* This code is similar to intern function from lread.c. */
|
||||
|
|
|
|||
|
|
@ -18858,7 +18858,7 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
|
|||
struct buffer *buffer = XBUFFER (w->contents);
|
||||
struct buffer *old = current_buffer;
|
||||
const unsigned char *arrow_string = SDATA (overlay_arrow_string);
|
||||
int arrow_len = SCHARS (overlay_arrow_string);
|
||||
ptrdiff_t arrow_len = SCHARS (overlay_arrow_string);
|
||||
const unsigned char *arrow_end = arrow_string + arrow_len;
|
||||
const unsigned char *p;
|
||||
struct it it;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue