diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2010-06-17 07:07:31 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2010-06-17 07:07:31 +0000 |
commit | cfc4bca6482b5611e3f9ed78c2d31f12e4852561 (patch) | |
tree | 0df996541dc0953d0276ab3aaaf71e5aeecb3924 /usr.bin/ssh | |
parent | 9dcf39ce10394ced86b82765acc9d843c185d9a9 (diff) |
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 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/mux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/mux.c b/usr.bin/ssh/mux.c index e96c689da69..098979cb9c0 100644 --- a/usr.bin/ssh/mux.c +++ b/usr.bin/ssh/mux.c @@ -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> * @@ -914,7 +914,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); |