From: Karl Heuer Date: Mon, 13 Apr 1998 18:56:00 +0000 (+0000) Subject: (Fcompute_motion): Check that TO and FROM are in range. X-Git-Tag: emacs-20.3~1578 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9fdae274dda00e3a0cf1284bc88daf537c2f8772;p=emacs.git (Fcompute_motion): Check that TO and FROM are in range. --- 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),