[PATCH] Implement ping -l, -w, -n using IcmpSendEcho
On 23/02/18 09:38, Isira Seneviratne wrote:
Hi Isira, Thanks for your contribution! Overall this patch looks good to me (although others might beg to differ). Just a couple of comments:
+ 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. Also, you'll want to specify the name of the component in your commit message, e.g. "[PATCH] ping: Implement -l, -w, -n." --Zeb
2018-02-23 12:29 GMT-07:00 Zebediah Figura <z.figura12(a)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
participants (3)
-
Alex Henrie -
Isira Seneviratne -
Zebediah Figura