Modified: trunk/CHANGES (1021 => 1022)
--- trunk/CHANGES 2012-02-15 18:58:47 UTC (rev 1021)
+++ trunk/CHANGES 2012-02-15 22:25:17 UTC (rev 1022)
@@ -1,5 +1,8 @@
Darwin Build Scripts Change History
-----------------------------------
+Release 29 [15-Feb-2012]
+ - darwintrace: posix_spawn may have NULL envp parameter
+
Release 28.1 [9-Feb-2012]
- darwinup: Don't include actual mach-o binaries in the test suite.
Modified: trunk/darwintrace/darwintrace.c (1021 => 1022)
--- trunk/darwintrace/darwintrace.c 2012-02-15 18:58:47 UTC (rev 1021)
+++ trunk/darwintrace/darwintrace.c 2012-02-15 22:25:17 UTC (rev 1022)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005-2011 Apple Inc. All rights reserved.
+ * Copyright (c) 2005-2012 Apple Inc. All rights reserved.
*
* @APPLE_BSD_LICENSE_HEADER_START@
*
@@ -393,11 +393,13 @@
int count = 0;
/* count the environment variables */
- while (envp[count] != NULL) {
- if (has_prefix(envp[count], DYLD_INSERT_LIBRARIES)) {
- libs = envp[count] + strlen(DYLD_INSERT_LIBRARIES);
+ if (envp) {
+ while (envp[count] != NULL) {
+ if (has_prefix(envp[count], DYLD_INSERT_LIBRARIES)) {
+ libs = envp[count] + strlen(DYLD_INSERT_LIBRARIES);
+ }
+ ++count;
}
- ++count;
}
/* allocate size of envp with enough space for three more values and NULL */
@@ -435,7 +437,9 @@
}
++i;
- memcpy(&result[i], envp, count * sizeof(char *));
+ if (envp) {
+ memcpy(&result[i], envp, count * sizeof(char *));
+ }
while (result[i] != NULL) {
if (has_prefix(result[i], DARWINTRACE_IGNORE_ROOTS) ||