From bbde4c5fccd2befdda889d63fe231817d1fb11c6 Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Wed, 13 May 2026 16:32:54 -0600 Subject: [PATCH] remove unnecessary check, idx will be 1 and derSz is at least 5 --- tests/api/api.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/api/api.h b/tests/api/api.h index f7c2be5792..2ce8c17d3a 100644 --- a/tests/api/api.h +++ b/tests/api/api.h @@ -268,9 +268,6 @@ static WC_INLINE int test_pkcs8_get_version_byte(const byte* der, word32 derSz) if (der[idx++] != 0x30) { return -1; } - if (idx >= derSz) { - return -1; - } if ((der[idx] & 0x80) == 0) { /* short-form length */ idx += 1;