aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wegener <sven.wegener@stealer.net>2009-11-26 16:46:23 +0100
committerDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>2009-12-11 17:49:50 +0100
commitc620469e28fe9d008591dd117ce2dab58ebc6778 (patch)
treedcf20ca3428c3358db958c4188c4582e21445bed
parent"Default" configuration may destroy host system (diff)
downloadlxc_0_6_4-gentoo.tar.gz
lxc_0_6_4-gentoo.tar.bz2
lxc_0_6_4-gentoo.zip
use correct number of ttys during setuplxc_0_6_4-gentoo-2lxc_0_6_4-gentoo
commit 985d15b106c8959ff130ba5425c2abbe36dc2cca "fix fdleak and errors in lxc_create_tty()" created a zero-sized malloc(), causing memory corruption. use config->tty like all the other code does. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-rw-r--r--src/lxc/conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 523270e..4f445a3 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -1007,7 +1007,7 @@ int lxc_create_tty(const char *name, struct lxc_conf *conf)
return 0;
tty_info->pty_info =
- malloc(sizeof(*tty_info->pty_info)*tty_info->nbtty);
+ malloc(sizeof(*tty_info->pty_info)*conf->tty);
if (!tty_info->pty_info) {
SYSERROR("failed to allocate pty_info");
return -1;