[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-devel
Subject: [Qemu-devel] [PATCH] Fix environ termination
From: Andreas Schwab <schwab () suse ! de>
Date: 2007-06-27 10:56:22
Message-ID: jey7i5vf6x.fsf () sykes ! suse ! de
[Download RAW message or body]
Properly NULL-terminate the environment.
Andreas.
--- linux-user/main.c.~1.116.~ 2007-06-25 12:39:20.000000000 +0200
+++ linux-user/main.c 2007-06-27 12:51:43.000000000 +0200
@@ -1819,7 +1819,7 @@ int main(int argc, char **argv)
continue;
*(dst++) = strdup(*wrk);
}
- dst = NULL; /* NULL terminate target_environ */
+ *dst = NULL; /* NULL terminate target_environ */
if (loader_exec(filename, argv+optind, target_environ, regs, info) != 0) {
printf("Error loading %s\n", filename);
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic