1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 09:00:31 -08:00

(Ffind_composition_internal): Check POS

for validity.
This commit is contained in:
Gerd Moellmann 2001-06-18 10:41:42 +00:00
parent 855eca564c
commit e3b3e32714

View file

@ -777,8 +777,18 @@ See `find-composition' for more detail.")
}
else
end = -1;
if (!NILP (string))
CHECK_STRING (string, 2);
{
CHECK_STRING (string, 2);
if (XINT (pos) < 0 || XINT (pos) >= XSTRING (string)->size)
args_out_of_range (string, pos);
}
else
{
if (XINT (pos) < BEGV || XINT (pos) >= ZV)
args_out_of_range (Fcurrent_buffer (), pos);
}
if (!find_composition (start, end, &start, &end, &prop, string))
return Qnil;