- 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
This commit is contained in:
Damien Miller 2010-06-26 09:36:34 +10:00
parent 4fe686d35f
commit c094d1e481
2 changed files with 8 additions and 2 deletions

View File

@ -7,6 +7,12 @@
[ssh-pkcs11.c]
check length of value returned C_GetAttributValue for != 0
from mdrtbugzilla@codefive.co.uk; bugzilla #1773; ok dtucker@
- 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
20100622
- (djm) [loginrec.c] crank LINFO_NAMESIZE (username length) to 512

4
mux.c
View File

@ -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);