mirror of
https://github.com/xcat2/xNBA.git
synced 2025-07-16 09:31:12 +00:00
[tcp] Fix potential NULL pointer dereference
Detected using Valgrind. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1143,7 +1143,7 @@ static int tcp_rx ( struct io_buffer *iobuf,
|
||||
flags = tcphdr->flags;
|
||||
tcp_rx_opts ( tcp, ( ( ( void * ) tcphdr ) + sizeof ( *tcphdr ) ),
|
||||
( hlen - sizeof ( *tcphdr ) ), &options );
|
||||
if ( options.tsopt )
|
||||
if ( tcp && options.tsopt )
|
||||
tcp->ts_val = ntohl ( options.tsopt->tsval );
|
||||
iob_pull ( iobuf, hlen );
|
||||
len = iob_len ( iobuf );
|
||||
|
Reference in New Issue
Block a user