VirtualBox

Changeset 73097 in vbox for trunk/src/VBox/NetworkServices


Ignore:
Timestamp:
Jul 12, 2018 9:06:33 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123672
Message:

*: Made RT_UOFFSETOF, RT_OFFSETOF, RT_UOFFSETOF_ADD and RT_OFFSETOF_ADD work like builtin_offsetof() and require compile time resolvable requests, adding RT_UOFFSETOF_DYN for the dynamic questions that can only be answered at runtime.

File:
1 edited

Legend:

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

    r69500 r73097  
    218218    bufsize += 16; /* whatever that is; empirically at least XP needs it */
    219219
    220     pong = (struct pong4 *)malloc(RT_OFFSETOF(struct pong4, buf) + bufsize);
     220    pong = (struct pong4 *)malloc(RT_UOFFSETOF(struct pong4, buf) + bufsize);
    221221    if (RT_UNLIKELY(pong == NULL)) {
    222222        goto out;
     
    502502    bufsize += 16;
    503503
    504     pong = (struct pong6 *)malloc(RT_OFFSETOF(struct pong6, buf) + bufsize);
     504    pong = (struct pong6 *)malloc(RT_UOFFSETOF(struct pong6, buf) + bufsize);
    505505    if (RT_UNLIKELY(pong == NULL)) {
    506506        goto out;
Note: See TracChangeset for help on using the changeset viewer.

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