File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,32 +18,31 @@ NON_EMPTY_TRANSLATION_UNIT
1818int quic_get_message (SSL * s , int * mt , size_t * len )
1919{
2020 size_t l ;
21- QUIC_DATA * qd ;
21+ QUIC_DATA * qd = s -> quic_input_data_head ;
2222 uint8_t * p ;
2323
24- if (s -> quic_input_data_head == NULL ) {
24+ if (qd == NULL || ( qd -> length - qd -> offset ) != 0 ) {
2525 s -> rwstate = SSL_READING ;
2626 * len = 0 ;
2727 return 0 ;
2828 }
2929
3030 /* This is where we check for the proper level, not when data is given */
31- if (s -> quic_input_data_head -> level != s -> quic_read_level ) {
31+ if (qd -> level != s -> quic_read_level ) {
3232 SSLfatal (s , SSL_AD_INTERNAL_ERROR , SSL_F_QUIC_GET_MESSAGE ,
3333 SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED );
3434 * len = 0 ;
3535 return 0 ;
3636 }
3737
38- if (!BUF_MEM_grow_clean (s -> init_buf , (int )s -> quic_input_data_head -> length )) {
38+ if (!BUF_MEM_grow_clean (s -> init_buf , (int )qd -> length )) {
3939 SSLfatal (s , SSL_AD_INTERNAL_ERROR , SSL_F_QUIC_GET_MESSAGE ,
4040 ERR_R_BUF_LIB );
4141 * len = 0 ;
4242 return 0 ;
4343 }
4444
4545 /* Copy buffered data */
46- qd = s -> quic_input_data_head ;
4746 memcpy (s -> init_buf -> data , (void * )(qd + 1 ), qd -> length );
4847 s -> init_buf -> length = qd -> length ;
4948 s -> quic_input_data_head = qd -> next ;
You can’t perform that action at this time.
0 commit comments