Skip to content

Commit 179c337

Browse files
committed
Fix warning found by CI
1 parent f2c4fde commit 179c337

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/ssl_sess.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,8 @@ int wolfSSL_memrestore_session_cache(const void* mem, int sz)
523523

524524
XMEMCPY(&SessionCache[i], row++, SIZEOF_SESSION_ROW);
525525
#ifndef SESSION_CACHE_DYNAMIC_MEM
526+
#if defined(HAVE_SESSION_TICKET) || \
527+
(defined(SESSION_CERTS) && defined(OPENSSL_EXTRA))
526528
/* Reset pointers to safe values after raw copy */
527529
{
528530
int j;
@@ -538,6 +540,7 @@ int wolfSSL_memrestore_session_cache(const void* mem, int sz)
538540
}
539541
}
540542
#endif
543+
#endif
541544
#ifdef ENABLE_SESSION_CACHE_ROW_LOCK
542545
SESSION_ROW_UNLOCK(&SessionCache[i]);
543546
#endif

tests/api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34590,7 +34590,7 @@ static int test_zd21422_pkcs7_padding_oracle(void)
3459034590
byte encoded[4096];
3459134591
byte output[256];
3459234592
byte modified[4096];
34593-
int encodedSz;
34593+
int encodedSz = 0;
3459434594
int outSz;
3459534595
int ctOff = -1;
3459634596
int ctLen = 0;

0 commit comments

Comments
 (0)