Prevent underflow when sending UDP probes.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 1 Apr 2022 12:28:45 +0000 (14:28 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 1 Apr 2022 12:28:45 +0000 (14:28 +0200)
commitca7502b6de1e1ae49a62ad6b7a7ae8b760fa51ff
tree770e0e42e215f5065135ebe93aa9a0fb7d575062
parentdff94d1df4228386ea9f523b1bfc37590ca31fd8
Prevent underflow when sending UDP probes.

Make sure send_udp_probe_packet() never tries to send a packet smaller
than MIN_PROBE_SIZE, otherwise length calculation could potentially wrap.

Fixes #351 on GitHub.
src/net_packet.c