Add two parameters (ip struct size and ip max packet) to ping's in_cksum implementation, and add a condition to clear a global buffer overflow.
Previously ping(8) crashes with Segmentation Fault due to Out-0f-Bound Read of size 2, causing global-buffer-overflow.
Submitted by: Neeraj <neerajpal09@gmail.com>
Tested by: Colin Zee <ckyzee@freebsdfoundation.org>