options: exit on a bad quoting regex, instead of crashing later
The paragraph-jumping functions used the regex unverified... This fixes https://savannah.gnu.org/bugs/?55169.master
parent
41c561c5cf
commit
6e3b9ac058
|
@ -2481,6 +2481,8 @@ int main(int argc, char **argv)
|
|||
|
||||
quoteerr = charalloc(size);
|
||||
regerror(quoterc, "ereg, quoteerr, size);
|
||||
|
||||
die(_("Bad quoting regex \"%s\": %s\n"), quotestr, quoteerr);
|
||||
}
|
||||
#endif /* ENABLE_JUSTIFY */
|
||||
|
||||
|
|
|
@ -2208,11 +2208,6 @@ void do_justify(bool full_justify)
|
|||
size_t was_current_x = openfile->current_x;
|
||||
#endif
|
||||
|
||||
if (quoterc != 0) {
|
||||
statusline(ALERT, _("Bad quoting regex %s: %s"), quotestr, quoteerr);
|
||||
return;
|
||||
}
|
||||
|
||||
/* When justifying the entire buffer, start at the top. Otherwise, when
|
||||
* in a paragraph but not at its beginning, move back to its first line. */
|
||||
if (full_justify)
|
||||
|
|
Loading…
Reference in New Issue