<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<p>And now I remember why I set udp_port to be an int instead of uint16_t before v3 ;) Fixed that, thanks.</p>
</blockquote>
<p>Remember that signed-integer overflow is <em>undefined-behavior</em>, as such simply changing the type of <code>udp_port</code> to <code>int</code> is not enough to make the implementation well-formed.</p>