From: Andre Noll Date: Fri, 19 Apr 2024 18:43:25 +0000 (+0200) Subject: Merge topic branch t/for-maint into pu X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=2c45095a6ef66bf1d64ccd78b59a48b88d179c5f Merge topic branch t/for-maint into pu This branch accumulates small but significant hotfixes for known bugs in the most stable integration branch, "maint". Only serious issues are fixed here, and no development takes place on this branch. The purpose of the branch is to give such urgent fixes at least a small amount of testing in pu before they are incorporated into maint. During this time the patch can be tweaked, and the documentation can be improved. Usually the commits of this branch are merged quickly, however, and it it perfectly normal if this branch is empty. * refs/heads/t/for-maint: play: Fix integer overflow in com_ff(). --- 2c45095a6ef66bf1d64ccd78b59a48b88d179c5f diff --cc play.c index bd183b6b,e5e053b9..b28cce63 --- a/play.c +++ b/play.c @@@ -945,10 -952,10 +945,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)