* src/sysdep.c (list_system_processes):
* src/xfaces.c (Finternal_set_lisp_face_attribute_from_resource):
Defend against Fstring_to_number returning a float or a nonsense
integer.
for (tail = proclist; CONSP (tail); tail = next)
{
next = XCDR (tail);
- XSETCAR (tail, Fstring_to_number (XCAR (tail), Qnil));
+ Lisp_Object pidstring = XCAR (tail);
+ Lisp_Object pid = Fstring_to_number (pidstring, Qnil);
+ if (!INTEGERP (pid) || XINT (pid) <= 0)
+ xsignal1 (Qoverflow_error, pidstring);
+ XSETCAR (tail, pid);
}
/* directory_files_internal returns the files in reverse order; undo
else if (EQ (attr, QCheight))
{
value = Fstring_to_number (value, make_number (10));
- if (XINT (value) <= 0)
+ if (!INTEGERP (value) || XINT (value) <= 0)
signal_error ("Invalid face height from X resource", value);
}
else if (EQ (attr, QCbold) || EQ (attr, QCitalic))