From: Michael Brown Date: Wed, 22 Mar 2017 13:11:05 +0000 (+0200) Subject: [tcp] Use correct length for memset() X-Git-Tag: v1.20.1~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75bb948008be207599fbb6534e282d45528f267b;p=thirdparty%2Fipxe.git [tcp] Use correct length for memset() Signed-off-by: Michael Brown --- diff --git a/src/net/tcp.c b/src/net/tcp.c index 37a202ef1..cb3b84edd 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -697,7 +697,7 @@ static void tcp_xmit_sack ( struct tcp_connection *tcp, uint32_t sack_seq ) { wsopt->wsopt.length = sizeof ( wsopt->wsopt ); wsopt->wsopt.scale = TCP_RX_WINDOW_SCALE; spopt = iob_push ( iobuf, sizeof ( *spopt ) ); - memset ( spopt->nop, TCP_OPTION_NOP, sizeof ( spopt ) ); + memset ( spopt->nop, TCP_OPTION_NOP, sizeof ( spopt->nop ) ); spopt->spopt.kind = TCP_OPTION_SACK_PERMITTED; spopt->spopt.length = sizeof ( spopt->spopt ); }