瀏覽代碼

[tcp] Use correct length for memset()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年之前
父節點
當前提交
75bb948008
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/net/tcp.c

+ 1
- 1
src/net/tcp.c 查看文件

@@ -697,7 +697,7 @@ static void tcp_xmit_sack ( struct tcp_connection *tcp, uint32_t sack_seq ) {
697 697
 		wsopt->wsopt.length = sizeof ( wsopt->wsopt );
698 698
 		wsopt->wsopt.scale = TCP_RX_WINDOW_SCALE;
699 699
 		spopt = iob_push ( iobuf, sizeof ( *spopt ) );
700
-		memset ( spopt->nop, TCP_OPTION_NOP, sizeof ( spopt ) );
700
+		memset ( spopt->nop, TCP_OPTION_NOP, sizeof ( spopt->nop ) );
701 701
 		spopt->spopt.kind = TCP_OPTION_SACK_PERMITTED;
702 702
 		spopt->spopt.length = sizeof ( spopt->spopt );
703 703
 	}

Loading…
取消
儲存