Mercurial > emacs
changeset 38097:8757fe98656e
(Ffind_composition_internal): Check POS
for validity.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 18 Jun 2001 10:41:42 +0000 |
parents | 1dd1f9ddca4c |
children | e9a9cf39298e |
files | src/composite.c |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/composite.c Mon Jun 18 10:21:59 2001 +0000 +++ b/src/composite.c Mon Jun 18 10:41:42 2001 +0000 @@ -777,8 +777,18 @@ } 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;