Heiko Schocher 546687c8dc lib: sm3: fix coverity error
Coverity scan reported:

CID 449815:         Memory - illegal accesses  (OVERRUN)
Overrunning array of 64 bytes at byte offset 64 by dereferencing pointer
"sctx->buffer + partial". [Note: The source code implementation of the
function has been overridden by a builtin model.]

In line: 252
   memset(sctx->buffer + partial, 0, SM3_BLOCK_SIZE - partial);

The respective line should be:

memset(sctx->buffer + partial, 0, SM3_BLOCK_SIZE - partial - 1);

as partial gets incremented by one before.

Signed-off-by: Heiko Schocher <hs@nabladev.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2026-02-11 11:13:47 +02:00
..
2025-11-06 08:30:33 -06:00
2025-04-11 12:16:44 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2025-04-11 12:16:44 -06:00
2024-07-15 12:12:18 -06:00
2025-07-26 07:34:31 +02:00
2024-07-15 12:12:18 -06:00
2024-10-11 11:44:48 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2024-07-15 12:12:18 -06:00
2025-02-03 16:01:36 -06:00
2025-07-22 11:29:33 -06:00
2025-02-03 16:01:36 -06:00
2024-12-06 17:47:23 -06:00
2025-04-03 16:54:49 -06:00
2024-12-06 17:47:23 -06:00
2025-01-18 17:12:47 -06:00
2024-12-06 17:47:23 -06:00
2026-02-11 11:13:47 +02:00
2025-02-12 12:37:12 -06:00
2024-11-13 08:14:23 -06:00
2025-01-28 08:58:41 +02:00
2025-12-04 09:38:58 -06:00
2022-01-19 18:11:34 +01:00
2024-10-14 17:58:30 -06:00
2025-12-04 09:38:58 -06:00
2025-04-23 13:19:44 -06:00
2024-11-13 08:16:41 -06:00