1 |
drac 08/02/24 18:43:13 |
2 |
|
3 |
Added: libtimidity-0.1.0-newlen-overflow.patch |
4 |
Log: |
5 |
Fix for overflow bug in size calculation by Hendrik Iben wrt #211289. |
6 |
(Portage version: 2.1.4.4) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libtimidity/files/libtimidity-0.1.0-newlen-overflow.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: libtimidity-0.1.0-newlen-overflow.patch |
15 |
=================================================================== |
16 |
diff -Naur libtimidity-0.1.0/src/resample.c libtimidity-0.1.0-r1/src/resample.c |
17 |
--- libtimidity-0.1.0/src/resample.c 2004-11-21 23:02:53.000000000 +0100 |
18 |
+++ libtimidity-0.1.0-r1/src/resample.c 2008-02-24 18:46:36.000000000 +0100 |
19 |
@@ -545,7 +545,8 @@ |
20 |
void pre_resample(MidSong *song, MidSample *sp) |
21 |
{ |
22 |
double a, xdiff; |
23 |
- sint32 incr, ofs, newlen, count; |
24 |
+ sint32 incr, ofs, count; |
25 |
+ unsigned int newlen; |
26 |
sint16 *newdata, *dest, *src = (sint16 *) sp->data; |
27 |
sint16 v1, v2, v3, v4, *vptr; |
28 |
#ifdef DEBUG_CHATTER |
29 |
@@ -561,7 +562,7 @@ |
30 |
|
31 |
a = ((double) (sp->sample_rate) * freq_table[(int) (sp->note_to_use)]) / |
32 |
((double) (sp->root_freq) * song->rate); |
33 |
- newlen = (sint32)(sp->data_length / a); |
34 |
+ newlen = (unsigned int)(sp->data_length / a); |
35 |
dest = newdata = safe_malloc(newlen >> (FRACTION_BITS - 1)); |
36 |
|
37 |
count = (newlen >> FRACTION_BITS) - 1; |
38 |
|
39 |
|
40 |
|
41 |
-- |
42 |
gentoo-commits@l.g.o mailing list |