From: Pekka Enberg Date: Thu, 29 Sep 2011 14:31:16 +0000 (+0300) Subject: kvm tools: NULL-terminate init env X-Git-Tag: next-20110930~2^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8244c52d22cb49d85f993c99610f58e89057c8ef;p=karo-tx-linux.git kvm tools: NULL-terminate init env This patch fixes 'kvm run' rootfs boot failures: Starting '/bin/sh'... Init failed: Bad address Signed-off-by: Pekka Enberg --- diff --git a/tools/kvm/guest/init.c b/tools/kvm/guest/init.c index 4fc6aaf02194..8975023cc899 100644 --- a/tools/kvm/guest/init.c +++ b/tools/kvm/guest/init.c @@ -11,7 +11,7 @@ static int run_process(char *filename) { char *new_argv[] = { filename, NULL }; - char *new_env[] = { "TERM=linux" }; + char *new_env[] = { "TERM=linux", NULL }; return execve(filename, new_argv, new_env); }