Files
scrcpy/app/src/util
Romain Vimont afbaf59abb Cast to sc_tick type in conversion macros
With the old macros definitions, the type of the result depended on the
type of `sec`.

In particular, if sec is a 32-bit type, sec * 1000000 was likely to
overflow (even if the result was assigned to a sc_tick by the caller of
the macro).

This was the case on Windows, where the long type is a 32-bit signed
integer: the --time-limit argument, expressed in seconds, was first
parsed to a long value, then multiplied by 1000000 by the
SC_TICK_FROM_SEC() macro, causing an overflow when the value was greater
than 2147 (2^31 / 1000000).

Fixes #5355 <https://github.com/Genymobile/scrcpy/issues/5355>
2024-10-08 18:18:05 +02:00
..
2021-11-23 21:15:05 +01:00
2024-05-30 15:56:37 +02:00
2023-03-10 22:22:15 +01:00
2023-03-10 22:22:15 +01:00
2021-11-24 22:06:49 +01:00
2021-11-12 22:44:37 +01:00
2021-11-24 22:06:49 +01:00
2023-03-10 22:22:15 +01:00
2023-03-10 22:22:15 +01:00
2022-08-17 16:40:45 +02:00
2022-08-17 16:40:45 +02:00
2021-12-09 21:32:11 +01:00
2022-02-09 09:53:19 +01:00
2023-01-27 19:26:19 +01:00
2023-01-27 19:26:19 +01:00
2021-11-24 22:06:49 +01:00
2021-11-11 14:55:52 +01:00
2021-11-11 15:22:39 +01:00
2021-11-11 15:22:39 +01:00
2024-09-14 21:24:15 +02:00
2024-09-14 21:24:15 +02:00
2021-12-08 23:45:45 +01:00
2024-10-08 18:12:55 +02:00
2023-06-10 16:04:51 +02:00
2023-10-24 23:12:36 +02:00
2023-03-10 22:22:15 +01:00