Changeset 53366 in vbox for trunk/src/VBox
- Timestamp:
- Nov 21, 2014 2:09:36 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/pxping_win.c
r51974 r53366 193 193 194 194 bufsize = sizeof(ICMP_ECHO_REPLY) + p->tot_len; 195 pong = (struct pong4 *)malloc( sizeof(*pong) - sizeof(pong->buf) + bufsize);195 pong = (struct pong4 *)malloc(RT_OFFSETOF(struct pong4, buf) + bufsize); 196 196 if (RT_UNLIKELY(pong == NULL)) { 197 197 goto out; … … 470 470 471 471 bufsize = sizeof(ICMPV6_ECHO_REPLY) + p->tot_len; 472 pong = (struct pong6 *)malloc( sizeof(*pong) - sizeof(pong->buf) + bufsize);472 pong = (struct pong6 *)malloc(RT_OFFSETOF(struct pong6, buf) + bufsize); 473 473 if (RT_UNLIKELY(pong == NULL)) { 474 474 goto out;
Note:
See TracChangeset
for help on using the changeset viewer.