audiod.c: Use correct size for filter node array.
authorAndre Noll <maan@systemlinux.org>
Sun, 20 Apr 2008 18:01:22 +0000 (20:01 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 20 Apr 2008 18:01:22 +0000 (20:01 +0200)
The previous code worked only by accident because struct
filter_chain is larger than struct filter_node.

audiod.c

index f4ff3ed..7afff93 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -275,7 +275,7 @@ static void open_filters(int slot_num)
                return;
        PARA_INFO_LOG("opening %s filters\n", audio_formats[s->format]);
        s->fc = para_calloc(sizeof(struct filter_chain));
-       s->fc->filter_nodes = para_malloc(nf * sizeof(struct filter_chain));
+       s->fc->filter_nodes = para_malloc(nf * sizeof(struct filter_node));
        s->fc->inbuf = s->receiver_node->buf;
        s->fc->in_loaded = &s->receiver_node->loaded;
        s->fc->input_error = &s->receiver_node->task.error;