[vlc-devel] [PATCHv4 1/3] access: Add satip access module
julian at jusst.de
Fri May 27 11:48:21 CEST 2016
On 27.05.2016 11:19, Filip Roséen wrote:
>> And now I remember why I set udp_port to be an int instead of uint16_t before v3 ;)
>> Fixed that, thanks.
> Remember that signed-integer overflow is *undefined-behavior*, as such simply
> changing the type of `udp_port` to `int` is not enough to make the
> implementation well-formed.
I handle it another way now. The while condition is reduced to
(sys->udp_sock) and an explicit if (udp_port == 65534) in the error
handler for sys->udp_sock creating to abort the loop. This works out as
sys->udp_sock is always probed on even port numbers.
More information about the vlc-devel