diff options
author | roman.artiukhin <bahusdrive@gmail.com> | 2023-11-02 09:40:56 +0200 |
---|---|---|
committer | roman.artiukhin <bahusdrive@gmail.com> | 2023-11-02 09:40:56 +0200 |
commit | 2030d681e4dd24e036d6e2c178cfb818e8f2b222 (patch) | |
tree | 540368027f3e0d1c94d5c5618dd6bfae17f67bc6 | |
parent | 332a0fa9686b2272b018bc2846a8b3a7dde198fd (diff) | |
download | rockbox-2030d681e4.tar.gz rockbox-2030d681e4.zip |
Codecs: mp4: Fix sign overflow in seek by offset
Change-Id: I52f536ae959f989c3dc70a50cb802eb1b8615642
-rw-r--r-- | lib/rbcodec/codecs/libm4a/m4a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/libm4a/m4a.c b/lib/rbcodec/codecs/libm4a/m4a.c index 1672cf300c..ecae2ad633 100644 --- a/lib/rbcodec/codecs/libm4a/m4a.c +++ b/lib/rbcodec/codecs/libm4a/m4a.c @@ -306,7 +306,7 @@ unsigned int m4a_seek_raw(demux_res_t* demux_res, stream_t* stream, new_sound_sample += tmp_cnt * tmp_dur; if (chunk_sample <= total_samples) { - new_sound_sample += (chunk_sample - total_samples) * tmp_dur; + new_sound_sample -= (total_samples - chunk_sample) * tmp_dur; break; } ++i; |