Browse Source

[tcp] Use correct length for memset()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
75bb948008
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/net/tcp.c

+ 1
- 1
src/net/tcp.c View File

697
 		wsopt->wsopt.length = sizeof ( wsopt->wsopt );
697
 		wsopt->wsopt.length = sizeof ( wsopt->wsopt );
698
 		wsopt->wsopt.scale = TCP_RX_WINDOW_SCALE;
698
 		wsopt->wsopt.scale = TCP_RX_WINDOW_SCALE;
699
 		spopt = iob_push ( iobuf, sizeof ( *spopt ) );
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
 		spopt->spopt.kind = TCP_OPTION_SACK_PERMITTED;
701
 		spopt->spopt.kind = TCP_OPTION_SACK_PERMITTED;
702
 		spopt->spopt.length = sizeof ( spopt->spopt );
702
 		spopt->spopt.length = sizeof ( spopt->spopt );
703
 	}
703
 	}

Loading…
Cancel
Save