Initialize ip6 pointer before use.

PR:		214169
MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2016-11-06 02:33:04 +00:00
parent c15d869233
commit 8432fa5fd9

View File

@ -2731,6 +2731,7 @@ tcp_signature_do_compute(struct mbuf *m, int len, int optlen,
* Note: Upper-Layer Packet Length comes before Next Header. * Note: Upper-Layer Packet Length comes before Next Header.
*/ */
case (IPV6_VERSION >> 4): case (IPV6_VERSION >> 4):
ip6 = mtod(m, struct ip6_hdr *);
in6 = ip6->ip6_src; in6 = ip6->ip6_src;
in6_clearscope(&in6); in6_clearscope(&in6);
MD5Update(&ctx, (char *)&in6, sizeof(struct in6_addr)); MD5Update(&ctx, (char *)&in6, sizeof(struct in6_addr));