VirtualBox

Changeset 53368 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 21, 2014 5:14:31 AM (10 years ago)
Author:
vboxsync
Message:

NET/Nat: pxping_recv6 - parrot pxping_recv4 change r96987.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/pxping_win.c

    r53367 r53368  
    475475    }
    476476
    477     bufsize = sizeof(ICMPV6_ECHO_REPLY) + p->tot_len;
     477    /* XXX: parrotted from IPv4 version, not tested all os version/bitness */
     478    bufsize = sizeof(ICMPV6_ECHO_REPLY);
     479    if (p->tot_len < sizeof(IO_STATUS_BLOCK) + sizeof(struct icmp6_echo_hdr))
     480        bufsize += sizeof(IO_STATUS_BLOCK) + sizeof(struct icmp6_echo_hdr);
     481    else
     482        bufsize += p->tot_len;
     483    bufsize += 16;
     484
    478485    pong = (struct pong6 *)malloc(RT_OFFSETOF(struct pong6, buf) + bufsize);
    479486    if (RT_UNLIKELY(pong == NULL)) {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette