Donate Share

TAP-plugins

Tracker: Bugs

5 tap_eq structure instantiation - ID: 1516969
Last Update: Comment added ( tszilagyi )

The equalizer instance structure keeps pointers to
ports and old port values (e.g. old_ch0f, etc.) to
minimize calls to eq_set_params() during run() calls.
However, instantiate_eq() never initializes tge old_*
values so they will be filled with junk from the heap.

This is generally not a problem, since the junk values
will not match the set port values and eq_set_params()
will be called anyway. But, I have an application that
creates and deletes equalizer instances sporadically.
It works out that occasionally the same area of heap
gets used, resulting in the old_* values being the same
and eq_set_params() never getting called.

This may be an arcane issue, but using uninitialized
variable values is generally not a good practice. This
can easily be rectified by initializing the eq
structure in instantiate_eq(), such as by adding a
memset(ptr, 0, sizeof(eq)) on line 223 of tap_eq.c
after the malloc().


Michael Minn ( michaelminn ) - 2006-07-04 13:39

5

Closed

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2006-08-09 12:05
Sender: tszilagyiProject AdminAccepting Donations

Logged In: YES
user_id=848020

Thanks for the detailed description & fix.
Committed to CVS.

In the future please mail me directly instead of
posting to the tracker. I will be able to reply
much quicker that way.

Tom



Log in to comment.

Attached File

No Files Currently Attached

Changes ( 2 )

Field Old Value Date By
status_id Open 2006-08-09 12:05 tszilagyi
close_date - 2006-08-09 12:05 tszilagyi