]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge topic branch t/for-maint into pu
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 19 Apr 2024 18:43:25 +0000 (20:43 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 19 Apr 2024 18:43:25 +0000 (20:43 +0200)
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().

1  2 
play.c

diff --cc play.c
index bd183b6b8dd48906e08cf142d7ff8c1e05aad48a,e5e053b95e49fb4fad9d412c39b6e30f20924a1b..b28cce63140b4e082249f574e244e4662dc86d3c
--- 1/play.c
--- 2/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)