Hi Ville, On 2025-12-08 at 19:15:42 +0200, Ville Syrjälä wrote: > On Thu, Dec 04, 2025 at 02:38:27PM +0000, Krzysztof Karas wrote: > > vpos (int) field multiplied by crtc_htotal (u16) may cause > > implicit promotion of the latter and overflow the result causing > > undefined behavior. > > How is that undefined? Good question. It is well defined in C standard to wrap silently to fit in the new type, so operations may complete. I think this might have been caused by working with static analyzer at the time, which imprinted word "undefined" in my brain, so it made sense to use it here as well.
I believe "unexpected" may better describe the problem. I'll change that in the v6 of this series. -- Best Regards, Krzysztof
