From 9fdae274dda00e3a0cf1284bc88daf537c2f8772 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Mon, 13 Apr 1998 18:56:00 +0000 Subject: [PATCH] (Fcompute_motion): Check that TO and FROM are in range. --- src/indent.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/indent.c b/src/indent.c index 2811fbde7b7..897aa8d1072 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1566,6 +1566,11 @@ DEFUN ("compute-motion", Fcompute_motion, Scompute_motion, 7, 7, 0, else CHECK_LIVE_WINDOW (window, 0); + if (XINT (from) < BEGV || XINT (from) > ZV) + args_out_of_range_3 (from, make_number (BEGV), make_number (ZV)); + if (XINT (to) < BEGV || XINT (to) > ZV) + args_out_of_range_3 (to, make_number (BEGV), make_number (ZV)); + pos = compute_motion (XINT (from), XINT (XCONS (frompos)->cdr), XINT (XCONS (frompos)->car), 0, XINT (to), XINT (XCONS (topos)->cdr), -- 2.39.2