]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/tcp_subr.c
xnu-792.6.70.tar.gz
[apple/xnu.git] / bsd / netinet / tcp_subr.c
index 0d8a168671fbc441aeac73865b65d95ed277c365..0e72a2325626e894a2b119273fec59e59366f813 100644 (file)
@@ -1058,6 +1058,7 @@ tcp_pcblist SYSCTL_HANDLER_ARGS
        gencnt = tcbinfo.ipi_gencnt;
        n = tcbinfo.ipi_count;
 
        gencnt = tcbinfo.ipi_gencnt;
        n = tcbinfo.ipi_count;
 
+       bzero(&xig, sizeof(xig));
        xig.xig_len = sizeof xig;
        xig.xig_count = n;
        xig.xig_gen = gencnt;
        xig.xig_len = sizeof xig;
        xig.xig_count = n;
        xig.xig_gen = gencnt;
@@ -1098,6 +1099,8 @@ tcp_pcblist SYSCTL_HANDLER_ARGS
                if (inp->inp_gencnt <= gencnt && inp->inp_state != INPCB_STATE_DEAD) {
                        struct xtcpcb xt;
                        caddr_t inp_ppcb;
                if (inp->inp_gencnt <= gencnt && inp->inp_state != INPCB_STATE_DEAD) {
                        struct xtcpcb xt;
                        caddr_t inp_ppcb;
+
+                       bzero(&xt, sizeof(xt));
                        xt.xt_len = sizeof xt;
                        /* XXX should avoid extra copy */
                        inpcb_to_compat(inp, &xt.xt_inp);
                        xt.xt_len = sizeof xt;
                        /* XXX should avoid extra copy */
                        inpcb_to_compat(inp, &xt.xt_inp);
@@ -1120,6 +1123,8 @@ tcp_pcblist SYSCTL_HANDLER_ARGS
                 * while we were processing this request, and it
                 * might be necessary to retry.
                 */
                 * while we were processing this request, and it
                 * might be necessary to retry.
                 */
+               bzero(&xig, sizeof(xig));
+               xig.xig_len = sizeof xig;
                xig.xig_gen = tcbinfo.ipi_gencnt;
                xig.xig_sogen = so_gencnt;
                xig.xig_count = tcbinfo.ipi_count;
                xig.xig_gen = tcbinfo.ipi_gencnt;
                xig.xig_sogen = so_gencnt;
                xig.xig_count = tcbinfo.ipi_count;