Mustafa Senoglu 247c860b8e
Fix memory errors in sample programs
Fix two memory safety issues in sample programs (not in the library):

1. ssl_server2.c: Add length check in dummy_ticket_parse() to prevent
   size_t underflow when len < 4. Previously, 'len - 4' would wrap
   around for short tickets, causing out-of-bounds reads.

2. ssl_context_info.c: Replace strlen() with memchr() in ALPN parsing
   to avoid reading past the alpn_len boundary. strlen() on unbounded
   data could read beyond the decoded buffer.

Both issues were in sample programs, not the library itself, but should
still be fixed to avoid confusion in future investigations.

Fixes #10803
2026-07-13 14:20:18 +03:00
..
CMakeLists.txt Update paths for moved program files in CMakeLists 2025-02-19 15:30:24 +00:00
dtls_client.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
dtls_server.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
mini_client.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
ssl_client1.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
ssl_client2.c tests|programs: call check_context_after_session_reset whenever mbedtls_ssl_session_reset 2026-06-24 14:30:59 +02:00
ssl_context_info.c Fix memory errors in sample programs 2026-07-13 14:20:18 +03:00
ssl_fork_server.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
ssl_mail_client.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
ssl_pthread_server.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
ssl_server2.c Fix memory errors in sample programs 2026-07-13 14:20:18 +03:00
ssl_server.c Remove Deprecated Items From Sample Programs 2026-01-14 13:01:22 +00:00
ssl_test_common_source.c Only check for certificates if it is supported 2025-03-20 17:53:07 +01:00
ssl_test_lib.c Add further rng removals highlighted by the ci 2026-01-14 13:01:23 +00:00
ssl_test_lib.h Tell MSVC to allow non-s functions where needed 2026-03-04 11:32:18 +01:00