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().
Nobody/Anonymous
None
None
Public
|
Date: 2006-08-09 12:05 Logged In: YES |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2006-08-09 12:05 | tszilagyi |
| close_date | - | 2006-08-09 12:05 | tszilagyi |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use