From 0619d5d5377ea2485b858e48da74780b75568500 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Thu, 21 Feb 2019 22:38:16 +0100 Subject: [PATCH] repeat(): add FATAL calls for errors that should be impossible --- b.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/b.c b/b.c index 13fddd8..94de52e 100644 --- a/b.c +++ b/b.c @@ -874,6 +874,7 @@ static int repeat(const uschar *reptok, int reptoklen, const uschar *atom, if (secondnum < 0) { /* means {n,} -> repeat n-1 times followed by PLUS */ if (firstnum < 2) { /* 0 or 1: should be handled before you get here */ + FATAL("internal error"); } else { return replace_repeat(reptok, reptoklen, atom, atomlen, firstnum, secondnum, REPEAT_PLUS_APPENDED); @@ -894,6 +895,7 @@ static int repeat(const uschar *reptok, int reptoklen, const uschar *atom, return replace_repeat(reptok, reptoklen, atom, atomlen, firstnum, secondnum, REPEAT_WITH_Q); } else { /* Error - shouldn't be here (n>m) */ + FATAL("internal error"); } return 0; }