From fac814c2dc31afef272b45392a7389ef0bfa3a4f Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 16 Apr 2023 17:45:27 +0900 Subject: Fix `PLATFORM_GET_INC` On platforms where unaligned word access is not allowed, and if `sizeof(val)` and `sizeof(type)` differ: - `val` > `type`, `val` will be a garbage. - `val` < `type`, outside `val` will be clobbered. --- regexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'regexec.c') diff --git a/regexec.c b/regexec.c index 65f8e8ee44..f800ca9f30 100644 --- a/regexec.c +++ b/regexec.c @@ -3464,7 +3464,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, if (ischanged && msa->enable_cache_match_opt) { RelAddrType rel; OnigUChar *addr; - int mem; + MemNumType mem; UChar* tmp = p; switch (*tmp++) { case OP_JUMP: -- cgit v1.2.3