Subject: 26.1; Missing range check in rx-submatch-n
From: Mattias Engdegård <[email-masked]>
To: [email-masked]
Date: Thu, 7 Feb 2019 19:01:33 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

`rx' should protect its own abstractions and never generate an invalid regexp, but will if given a bad submatch number:

(rx (group-n 0 "x"))
=> "\\(?0:x\\)"

It's a missing range check in rx-submatch-n.

In GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511))
 of 2018-05-31 built on builder10-10.porkrind.org
Windowing system distributor 'Apple', version 10.3.1671