search for: f151021

Displaying 1 result from an estimated 1 matches for "f151021".

2010 Jun 17
1
Small bug in mux_master_read_cb()
...ting the size of a pointer, instead of the size of the struct being pointed to. The bug is benign in the original code because the struct has only an int element inside it, but it would corrupt memory if the struct were to be extended. Simple fix here: diff --git a/mux.c b/mux.c index 3f5babc..f151021 100644 --- a/mux.c +++ b/mux.c @@ -931,7 +976,7 @@ mux_master_read_cb(Channel *c) /* Setup ctx and */ if (c->mux_ctx == NULL) { - state = xcalloc(1, sizeof(state)); + state = xcalloc(1, sizeof(*state)); c->mux_ctx = state; channel_register_cleanup(c-&...