]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[tcp] Use correct length for memset()
authorMichael Brown <mcb30@ipxe.org>
Wed, 22 Mar 2017 13:11:05 +0000 (15:11 +0200)
committerMichael Brown <mcb30@ipxe.org>
Wed, 22 Mar 2017 13:11:05 +0000 (15:11 +0200)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/tcp.c

index 37a202ef1309534049720a65b6de760fbf9fb591..cb3b84edd8c62fe1a8af58b0fa619b398a9362e5 100644 (file)
@@ -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 );
        }