diff options
| author | Gerd Moellmann | 2001-06-18 10:41:42 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-06-18 10:41:42 +0000 |
| commit | e3b3e3271489eda3e7f2a3fd404dced8fbb10d60 (patch) | |
| tree | 22dfb5dc21579af6f3a485cad88a8e844c28c095 /src | |
| parent | 855eca564cc7814366babaf5f792e69468f97597 (diff) | |
| download | emacs-e3b3e3271489eda3e7f2a3fd404dced8fbb10d60.tar.gz emacs-e3b3e3271489eda3e7f2a3fd404dced8fbb10d60.zip | |
(Ffind_composition_internal): Check POS
for validity.
Diffstat (limited to 'src')
| -rw-r--r-- | src/composite.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/composite.c b/src/composite.c index 9ff5f855bed..6f60ddbca5a 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -777,8 +777,18 @@ See `find-composition' for more detail.") | |||
| 777 | } | 777 | } |
| 778 | else | 778 | else |
| 779 | end = -1; | 779 | end = -1; |
| 780 | |||
| 780 | if (!NILP (string)) | 781 | if (!NILP (string)) |
| 781 | CHECK_STRING (string, 2); | 782 | { |
| 783 | CHECK_STRING (string, 2); | ||
| 784 | if (XINT (pos) < 0 || XINT (pos) >= XSTRING (string)->size) | ||
| 785 | args_out_of_range (string, pos); | ||
| 786 | } | ||
| 787 | else | ||
| 788 | { | ||
| 789 | if (XINT (pos) < BEGV || XINT (pos) >= ZV) | ||
| 790 | args_out_of_range (Fcurrent_buffer (), pos); | ||
| 791 | } | ||
| 782 | 792 | ||
| 783 | if (!find_composition (start, end, &start, &end, &prop, string)) | 793 | if (!find_composition (start, end, &start, &end, &prop, string)) |
| 784 | return Qnil; | 794 | return Qnil; |