From: Andre Noll Date: Tue, 6 Aug 2024 15:25:14 +0000 (+0200) Subject: Merge branch 'maint' X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=3944ed1dd80400a0631b645af04a28ec247b8181;p=paraslash.git Merge branch 'maint' The merge conflicted due to an integer overflow fix in com_jmp(). * maint: play: Fix some integer overflows(). --- 3944ed1dd80400a0631b645af04a28ec247b8181 diff --cc play.c index 4adedcc0,f28a324c..11a1cd39 --- a/play.c +++ b/play.c @@@ -944,10 -952,10 +944,10 @@@ static int com_ff(struct lls_parse_resu return ret; if (pt->playing && !pt->fn.btrn) return 0; - seconds += get_play_time(); + seconds += (get_play_time() + 500) / 1000; seconds = PARA_MIN(seconds, (typeof(seconds))pt->seconds - 4); seconds = PARA_MAX(seconds, 0); - pt->start_chunk = pt->num_chunks * seconds / pt->seconds; + pt->start_chunk = (uint64_t)pt->num_chunks * seconds / pt->seconds; pt->start_chunk = PARA_MIN(pt->start_chunk, pt->num_chunks - 1); pt->start_chunk = PARA_MAX(pt->start_chunk, 0UL); if (!pt->playing)