From 1e2bc78fd0c073f6d1a5e7f9351f10f551c9c3cf Mon Sep 17 00:00:00 2001 From: philsmd Date: Sat, 13 Jun 2020 11:06:05 +0200 Subject: [PATCH] rule engine: add zero-length check for rule 'z' --- OpenCL/inc_rp.cl | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenCL/inc_rp.cl b/OpenCL/inc_rp.cl index 2e4d43a85..56dc6f5de 100644 --- a/OpenCL/inc_rp.cl +++ b/OpenCL/inc_rp.cl @@ -518,6 +518,7 @@ DECLSPEC int mangle_dupechar_first (MAYBE_UNUSED const u8 p0, MAYBE_UNUSED const { const int out_len = len + p0; + if (len == 0) return (len); if (out_len >= RP_PASSWORD_SIZE) return (len); const u8 c = buf[0];