SAFE_ALLOCA fixes
* src/comp.c (declare_imported_func, emit_simple_limple_call)
(declare_lex_function, compile_function):
* src/emacs-module.c (funcall_module):
* src/fns.c (Fstring_distance):
* src/font.c (font_sort_entities):
* src/haikumenu.c (digest_menu_items, haiku_menu_show):
* src/pgtkselect.c (Fpgtk_register_dnd_targets):
* src/xfns.c (Fx_begin_drag):
* src/xmenu.c (x_menu_show):
* src/xterm.c (x_dnd_compute_toplevels, handle_one_xevent)
(x_term_init):
Prefer SAFE_NALLOCA to doing size multiplication by hand, to catch
unlikely integer overflows.
* src/comp.c (emit_simple_limple_call): Fix bug where
SAFE_FREE was called too early, leading to unlikely
use of freed storage.
* src/xterm.c (handle_one_xevent): Remove side effects
from SAFE_ALLOCA args, as the args are evaluated twice.
(cherry picked from commit
101ec1430128a0b1d9e7d54cbd9c0add8f446f25)