[PATCH] Implement ping -l, -w, -n using IcmpSendEcho

Alex Henrie alexhenrie24 at gmail.com
Fri Feb 23 13:57:31 CST 2018


2018-02-23 12:29 GMT-07:00 Zebediah Figura <z.figura12 at gmail.com>:
> On 23/02/18 09:38, Isira Seneviratne wrote:
>> +    send_data = malloc(l);
>> +    reply_size = sizeof(ICMP_ECHO_REPLY) + l + 8;
>> +    /* The buffer has to hold 8 more bytes of data (the size of an
> ICMP error message). */
>> +    reply_buffer = malloc(reply_size);
>
> These should be heap_alloc() instead, which is a wrapper around the
> Windows function HeapAlloc(). You'll need to include wine/heap.h for that.

Good point. After looking at it some more, I think reply_buffer should
come from heap_alloc and send_data should come from heap_alloc_zero.

-Alex



More information about the wine-devel mailing list