[launchd-changes] [23236] trunk/launchd/src/launchctl.c

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 26 16:35:46 PDT 2007


Revision: 23236
          http://trac.macosforge.org/projects/launchd/changeset/23236
Author:   zarzycki at 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 == '#') {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070426/51a2cbda/attachment.html


More information about the launchd-changes mailing list