]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge topic branch t/for-maint into pu
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 May 2024 16:35:44 +0000 (18:35 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 May 2024 16:35:44 +0000 (18:35 +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 some integer overflows().

# Conflicts:
# play.c

1  2 
play.c

diff --cc play.c
index 4adedcc0475a6a810513989499ab31b752d2a945,f28a324c30a2554a10de558b1fb0f3d2e5990e67..11a1cd3923ad26eb514106b83fd51bc3c1d6e42e
--- 1/play.c
--- 2/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)