From: Richard M. Stallman Date: Sun, 14 May 2006 21:53:45 +0000 (+0000) Subject: (get_local_map): Abort if POSITION outside BEGV, ZV. X-Git-Tag: emacs-pretest-22.0.90~2565 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1b0440ed041cd311eb7e59cbe6219f7ffa26a909;p=emacs.git (get_local_map): Abort if POSITION outside BEGV, ZV. --- diff --git a/src/intervals.c b/src/intervals.c index 086db4db6bd..e69ff701387 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -2341,7 +2341,9 @@ get_property_and_range (pos, prop, val, start, end, object) /* Return the proper local keymap TYPE for position POSITION in BUFFER; TYPE should be one of `keymap' or `local-map'. Use the map specified by the PROP property, if any. Otherwise, if TYPE is - `local-map' use BUFFER's local map. */ + `local-map' use BUFFER's local map. + + POSITION must be in the accessible part of BUFFER. */ Lisp_Object get_local_map (position, buffer, type) @@ -2353,7 +2355,7 @@ get_local_map (position, buffer, type) int old_begv, old_zv, old_begv_byte, old_zv_byte; /* Perhaps we should just change `position' to the limit. */ - if (position > BUF_Z (buffer) || position < BUF_BEG (buffer)) + if (position > BUF_ZV (buffer) || position < BUF_BEGV (buffer)) abort (); /* Ignore narrowing, so that a local map continues to be valid even if