Sfoglia il codice sorgente

[tls] Fix uninitialised variable

Reported-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 anni fa
parent
commit
1e199c8260
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1
    2
      src/net/tls.c

+ 1
- 2
src/net/tls.c Vedi File

@@ -1773,8 +1773,7 @@ static int tls_new_record ( struct tls_session *tls, unsigned int type,
1773 1773
 	}
1774 1774
 
1775 1775
 	/* Handle record and free I/O buffer */
1776
-	if ( handler )
1777
-		rc = handler ( tls, iobuf->data, iob_len ( iobuf ) );
1776
+	rc = ( handler ? handler ( tls, iobuf->data, iob_len ( iobuf ) ) : 0 );
1778 1777
 	free_iob ( iobuf );
1779 1778
 	return rc;
1780 1779
 }

Loading…
Annulla
Salva