mirror of
https://github.com/xcat2/xNBA.git
synced 2025-02-06 22:11:57 +00:00
[tcp] Fix potential NULL pointer dereference
Detected using Valgrind. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
e844297ef6
commit
52dd4bacad
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user