DKIM: fix $dkim_key_length in verify
[exim.git] / src / src / verify.c
index dda51a5a260e30bd2553d1df7b66019fbb464a12..9955bd1ff6d7cd983c4b0e5d8c5ce38d2632e3f8 100644 (file)
@@ -2945,15 +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)
-  {
-  opts++;
-  opts = string_copyn(opts, semicolon - opts);
-  }
+  if ((opts = Ustrchr(ss, ',')) && opts < semicolon)
+    {
+    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-". */