diff options
author | djm <djm> | 2010-06-25 23:36:34 +0000 |
---|---|---|
committer | djm <djm> | 2010-06-25 23:36:34 +0000 |
commit | a270b57c5fd40120fe2428c853260a4bc14bc5fc (patch) | |
tree | c529c0b0283bfe88b89fe81b86d1043ddb2e8978 /mux.c | |
parent | 3fc4aff2805a6c693498853da3347242411a610d (diff) | |
download | openssh-a270b57c5fd40120fe2428c853260a4bc14bc5fc.tar.gz |
- djm@cvs.openbsd.org 2010/06/17 07:07:30
[mux.c]
Correct sizing of object to be allocated by calloc(), replacing
sizeof(state) with sizeof(*state). This worked by accident since
the struct contained a single int at present, but could have broken
in the future. patch from hyc AT symas.com
Diffstat (limited to 'mux.c')
-rw-r--r-- | mux.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.18 2010/05/16 12:55:51 markus Exp $ */ +/* $OpenBSD: mux.c,v 1.19 2010/06/17 07:07:30 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -931,7 +931,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->self, mux_master_control_cleanup_cb, 0); |