• Dmitry Antipov's avatar
    Do not allow out-of-range character position in Fcompare_strings. · 5697ca55
    Dmitry Antipov authored
    * src/fns.c (validate_subarray): Add prototype.
    (Fcompare_substring): Use validate_subarray to check ranges.
    Adjust comment to mention that the semantics was changed.  Also see
    * lisp/files.el (dir-locals-find-file, file-relative-name):
    * lisp/info.el (Info-complete-menu-item):
    * lisp/minibuffer.el (completion-table-subvert): Prefer string-prefix-p
    to compare-strings to avoid out-of-range errors.
    * lisp/subr.el (string-prefix-p): Adjust to match strict range
    checking in compare-strings.
    * test/automated/fns-tests.el (fns-tests-compare-string): New test.
subr.el 191 KB