[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix environ termination
From: |
Andreas Schwab |
Subject: |
[Qemu-devel] [PATCH] Fix environ termination |
Date: |
Wed, 27 Jun 2007 12:56:22 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.97 (gnu/linux) |
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, address@hidden
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 Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] Fix environ termination,
Andreas Schwab <=