Fix integer-overflow bug in Time conversion
Problem reported by Stefan Monnier (Bug#37795). * src/keyboard.c (make_lispy_position) (make_scroll_bar_position, make_lispy_event): * src/xterm.c (x_ewmh_activate_frame): Use INT_TO_INTEGER to convert Time to a Lisp integer, since the value might not be a fixnum.
This commit is contained in:
parent
36c75c2a41
commit
b72ff3667a
2 changed files with 5 additions and 4 deletions
|
@ -5242,7 +5242,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
|
|||
Fcons (posn,
|
||||
Fcons (Fcons (make_fixnum (xret),
|
||||
make_fixnum (yret)),
|
||||
Fcons (make_fixnum (t),
|
||||
Fcons (INT_TO_INTEGER (t),
|
||||
extra_info))));
|
||||
}
|
||||
|
||||
|
@ -5267,7 +5267,7 @@ static Lisp_Object
|
|||
make_scroll_bar_position (struct input_event *ev, Lisp_Object type)
|
||||
{
|
||||
return list5 (ev->frame_or_window, type, Fcons (ev->x, ev->y),
|
||||
make_fixnum (ev->timestamp),
|
||||
INT_TO_INTEGER (ev->timestamp),
|
||||
builtin_lisp_symbol (scroll_bar_parts[ev->part]));
|
||||
}
|
||||
|
||||
|
@ -5579,7 +5579,7 @@ make_lispy_event (struct input_event *event)
|
|||
position = list4 (event->frame_or_window,
|
||||
Qmenu_bar,
|
||||
Fcons (event->x, event->y),
|
||||
make_fixnum (event->timestamp));
|
||||
INT_TO_INTEGER (event->timestamp));
|
||||
|
||||
return list2 (item, position);
|
||||
}
|
||||
|
|
|
@ -11589,7 +11589,8 @@ x_ewmh_activate_frame (struct frame *f)
|
|||
x_send_client_event (frame, make_fixnum (0), frame,
|
||||
dpyinfo->Xatom_net_active_window,
|
||||
make_fixnum (32),
|
||||
list2i (1, dpyinfo->last_user_time));
|
||||
list2 (make_fixnum (1),
|
||||
INT_TO_INTEGER (dpyinfo->last_user_time)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue