File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3534,6 +3534,10 @@ int wolfSSL_SESSION_get_master_key_length(const WOLFSSL_SESSION* ses)
35343534#ifdef WOLFSSL_EARLY_DATA
35353535unsigned int wolfSSL_SESSION_get_max_early_data (const WOLFSSL_SESSION * session )
35363536{
3537+ if (session == NULL ) {
3538+ return BAD_FUNC_ARG ;
3539+ }
3540+
35373541 return session -> maxEarlyDataSz ;
35383542}
35393543#endif /* WOLFSSL_EARLY_DATA */
Original file line number Diff line number Diff line change @@ -1675,6 +1675,9 @@ static int test_quic_early_data(int verbose) {
16751675 QuicTestContext_free (& tclient );
16761676 QuicTestContext_free (& tserver );
16771677
1678+ /* check for error value with null argument */
1679+ ExpectIntEQ (wolfSSL_SESSION_get_max_early_data (NULL ), BAD_FUNC_ARG );
1680+
16781681 /* QUIC requires 0 or 0xffffffff as only allowed values.
16791682 * Since we enabled early data in the server that created the session,
16801683 * we need to see it here. */
You can’t perform that action at this time.
0 commit comments