Revision: 23236 http://trac.macosforge.org/projects/launchd/changeset/23236 Author: zarzycki@apple.com Date: 2007-04-26 16:35:46 -0700 (Thu, 26 Apr 2007) Log Message: ----------- <rdar://problem/5156440> 9A422: launchd is passing \n to sysctl Modified Paths: -------------- trunk/launchd/src/launchctl.c Modified: trunk/launchd/src/launchctl.c =================================================================== --- trunk/launchd/src/launchctl.c 2007-04-26 23:28:44 UTC (rev 23235) +++ trunk/launchd/src/launchctl.c 2007-04-26 23:35:46 UTC (rev 23236) @@ -2849,6 +2849,10 @@ tmpstr[ln_len] = 0; val = tmpstr; + if (val[ln_len - 1] == '\n' || val[ln_len - 1] == '\r') { + val[ln_len - 1] = '\0'; + } + while (*val && isspace(*val)) val++; if (*val == '\0' || *val == '#') {
participants (1)
-
source_changes@macosforge.org