Fix ACL "condition =" for negative number values. Bug 1005
[exim.git] / src / src / expand.c
index bd097db432f80f242b7bd641479931e497c2c312..64a3a86e6156a5b3282dc475f67fa0023de579d8 100644 (file)
@@ -2849,7 +2849,9 @@ switch(cond_type)
     be no maintenance burden from replicating it. */
     if (len == 0)
       boolvalue = FALSE;
-    else if (Ustrspn(t, "0123456789") == len)
+    else if (*t == '-'
+            ? Ustrspn(t+1, "0123456789") == len-1
+            : Ustrspn(t,   "0123456789") == len)
       {
       boolvalue = (Uatoi(t) == 0) ? FALSE : TRUE;
       /* expand_check_condition only does a literal string "0" check */