On 32 bit machine timespec->tv_sec (time_t) is 32 bit. Also 1000 * 1000 * 1000 is 32 bit. The multiplication 32 x 32 lead to a 32 bit however this can overflow. Convert the first factor to 64 bit before multiply solve the issue. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/red_worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/red_worker.c b/server/red_worker.c index 1655bbe..d4abc3c 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -163,7 +163,7 @@ static void rendering_incorrect(const char *msg) static inline red_time_t timespec_to_red_time(struct timespec *time) { - return time->tv_sec * (1000 * 1000 * 1000) + time->tv_nsec; + return (red_time_t) time->tv_sec * (1000 * 1000 * 1000) + time->tv_nsec; } #if defined(RED_WORKER_STAT) || defined(COMPRESS_STAT) -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel