This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10446 - Prevent potential problems in dsp.c by allowing for 0 count function calls
Attached to Project:
Rockbox
Opened by Jeffrey Goode (Blue_Dude) - Saturday, 18 July 2009, 05:59 GMT+2
Last edited by Jeffrey Goode (Blue_Dude) - Wednesday, 12 August 2009, 22:25 GMT+2
Opened by Jeffrey Goode (Blue_Dude) - Saturday, 18 July 2009, 05:59 GMT+2
Last edited by Jeffrey Goode (Blue_Dude) - Wednesday, 12 August 2009, 22:25 GMT+2
|
DetailsThere are a number of functions in dsp.c that operate with a do-while loop. Most of these are contingent upon the count argument being greater than zero. While this should always be true, these functions are not fault tolerant and will exhibit unwanted results if called with a count of zero. So I've changed these do-while loops to equivalent while loops.
I've also changed an unrelated comment mistake describing the nature of a replaygain variable. |
This task depends upon
Closed by Jeffrey Goode (Blue_Dude)
Wednesday, 12 August 2009, 22:25 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r22282
Wednesday, 12 August 2009, 22:25 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r22282
Oops. That one had some extra semi colons. This one works.
Actually, that comment is more appropriate at the right-shift in set_gain... (And ouch, I should've moved that comment :) ).
There was some concern that this patch may affect processing speed. After benchmarking with an improved test_codec, I can confirm that it does not affect performance.