mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-20 04:50:55 -07:00
Prefer ptrdiff_t to int and avoid integer overflows.
* fileio.c (make_temp_name): * font.c (font_parse_family_registry): Avoid integer overflow on string size calculation. * data.c (Faset): Likewise for byte index.
This commit is contained in:
parent
ccb767d639
commit
005aff7092
4 changed files with 9 additions and 3 deletions
|
|
@ -9,6 +9,12 @@
|
|||
(apply_lambda): Likewise. Get current specpdl level as 3rd arg.
|
||||
(do_debug_on_call): Get current specpdl level as 2nd arg.
|
||||
|
||||
Prefer ptrdiff_t to int and avoid integer overflows.
|
||||
* fileio.c (make_temp_name):
|
||||
* font.c (font_parse_family_registry): Avoid integer
|
||||
overflow on string size calculation.
|
||||
* data.c (Faset): Likewise for byte index.
|
||||
|
||||
2014-09-15 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
Fix display of R2L lines in partial-width windows.
|
||||
|
|
|
|||
|
|
@ -2248,7 +2248,7 @@ bool-vector. IDX starts at 0. */)
|
|||
{
|
||||
if (! SINGLE_BYTE_CHAR_P (c))
|
||||
{
|
||||
int i;
|
||||
ptrdiff_t i;
|
||||
|
||||
for (i = SBYTES (array) - 1; i >= 0; i--)
|
||||
if (SREF (array, i) >= 0x80)
|
||||
|
|
|
|||
|
|
@ -733,7 +733,7 @@ Lisp_Object
|
|||
make_temp_name (Lisp_Object prefix, bool base64_p)
|
||||
{
|
||||
Lisp_Object val, encoded_prefix;
|
||||
int len;
|
||||
ptrdiff_t len;
|
||||
printmax_t pid;
|
||||
char *p, *data;
|
||||
char pidbuf[INT_BUFSIZE_BOUND (printmax_t)];
|
||||
|
|
|
|||
|
|
@ -1724,7 +1724,7 @@ font_parse_name (char *name, ptrdiff_t namelen, Lisp_Object font)
|
|||
void
|
||||
font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Object font_spec)
|
||||
{
|
||||
int len;
|
||||
ptrdiff_t len;
|
||||
char *p0, *p1;
|
||||
|
||||
if (! NILP (family)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue