Gitweb:
https://git.exim.org/exim.git/commitdiff/f82c06aac7959d473020a68bb24a74690a1ac5ef
Commit: f82c06aac7959d473020a68bb24a74690a1ac5ef
Parent: b50e778f1011c618e6f7fd73ac544a5903a29e1a
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Apr 12 22:24:21 2020 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Sun Apr 12 22:24:21 2020 +0100
Better fix for crash
Broken-by: 0b4dfe7aa1
---
src/src/verify.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/src/verify.c b/src/src/verify.c
index 73d2d76..9955bd1 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -2945,17 +2945,20 @@ if (*t == 0 || (*t == '/' && t != ss))
return ERROR;
}
-/* See if there is a semicolon in the pattern */
+/* See if there is a semicolon in the pattern, separating a searchtype
+prefix. If there is one then check for comma-sep options. */
if ((semicolon = Ustrchr(ss, ';')))
- {
- endname = (opts = Ustrchr(ss, ',')) ? opts : semicolon;
- if (opts)
+ if ((opts = Ustrchr(ss, ',')) && opts < semicolon)
{
- opts++;
+ endname = opts++;
opts = string_copyn(opts, semicolon - opts);
}
- }
+ else
+ {
+ endname = semicolon;
+ opts = NULL;
+ }
/* If we are doing an IP address only match, then all lookups must be IP
address lookups, even if there is no "net-". */