From 178fee32b368db44e94381ce52fbbea35e606e69 Mon Sep 17 00:00:00 2001 From: fractasy Date: Mon, 14 Oct 2024 09:47:22 +0000 Subject: [PATCH] Fix Padding PG SM executor negative remaining length check --- src/sm/padding_pg/padding_pg_executor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sm/padding_pg/padding_pg_executor.cpp b/src/sm/padding_pg/padding_pg_executor.cpp index c1fd11cad..e27a62ea9 100644 --- a/src/sm/padding_pg/padding_pg_executor.cpp +++ b/src/sm/padding_pg/padding_pg_executor.cpp @@ -101,7 +101,7 @@ void PaddingPGExecutor::execute (vector &input, PaddingP if (!fr.isZero(pols.rem[p])) { pols.remInv[p] = glp.inv(pols.rem[p]); - if (fr.toU64(pols.rem[p]) > 0xFFFF) pols.spare[p] = fr.one(); + if (fr.toU64(pols.rem[p]) > 0xFFFFFFFF) pols.spare[p] = fr.one(); } bool lastBlock = (p % bytesPerBlock) == (bytesPerBlock - 1);