BOOL *subcondptr;
BOOL sub2_honour_dollar = TRUE;
int i, rc, cond_type, roffset;
BOOL *subcondptr;
BOOL sub2_honour_dollar = TRUE;
int i, rc, cond_type, roffset;
eval_expr(uschar **sptr, BOOL decimal, uschar **error, BOOL endket)
{
uschar *s = *sptr;
eval_expr(uschar **sptr, BOOL decimal, uschar **error, BOOL endket)
{
uschar *s = *sptr;
- (void)sscanf(CS s, (decimal? "%d%n" : "%i%n"), &n, &count);
+ (void)sscanf(CS s, (decimal? "%lld%n" : "%lli%n"), &n, &count);
if (*error != NULL) break;
/* SIGFPE both on div/mod by zero and on INT_MIN / -1, which would give
* a value of INT_MAX+1. Note that INT_MIN * -1 gives INT_MIN for me, which
if (*error != NULL) break;
/* SIGFPE both on div/mod by zero and on INT_MIN / -1, which would give
* a value of INT_MAX+1. Note that INT_MIN * -1 gives INT_MIN for me, which
* can just let the other invalid results occur otherwise, as they have
* until now. For this one case, we can coerce.
*/
* can just let the other invalid results occur otherwise, as they have
* until now. For this one case, we can coerce.
*/
- debug_printf("Integer exception dodging: %d%c-1 coerced to %d\n",
- INT_MIN, op, INT_MAX);
- x = INT_MAX;
+ debug_printf("Integer exception dodging: %lld%c-1 coerced to %lld\n",
+ LLONG_MIN, op, LLONG_MAX);
+ x = LLONG_MAX;
s++;
y = eval_op_shift(&s, decimal, error);
if (*error != NULL) break;
s++;
y = eval_op_shift(&s, decimal, error);
if (*error != NULL) break;
s++;
y = eval_op_and(&s, decimal, error);
if (*error != NULL) break;
s++;
y = eval_op_and(&s, decimal, error);
if (*error != NULL) break;
s++;
y = eval_op_xor(&s, decimal, error);
if (*error != NULL) break;
s++;
y = eval_op_xor(&s, decimal, error);
if (*error != NULL) break;
- int n = eval_expr(&sub, (c == EOP_EVAL10), &error, FALSE);
+ int64_t n = eval_expr(&sub, (c == EOP_EVAL10), &error, FALSE);
yield = string_cat(yield, &size, &ptr, var_buffer, Ustrlen(var_buffer));
continue;
}
yield = string_cat(yield, &size, &ptr, var_buffer, Ustrlen(var_buffer));
continue;
}
uschar *s;
max = expand_string_integer(sub, TRUE);
if (expand_string_message != NULL)
goto EXPAND_FAILED;
uschar *s;
max = expand_string_integer(sub, TRUE);
if (expand_string_message != NULL)
goto EXPAND_FAILED;
yield = string_cat(yield, &size, &ptr, s, Ustrlen(s));
continue;
}
yield = string_cat(yield, &size, &ptr, s, Ustrlen(s));
continue;
}