]> git.saurik.com Git - apple/launchd.git/blobdiff - launchd/src/StartupItems.c
launchd-106.20.tar.gz
[apple/launchd.git] / launchd / src / StartupItems.c
index 46f0e1aa3adb8e6c285fb5a7d7071206e4ca416a..3c95129e552eb757c9f57ebb08666b71ba4389a8 100644 (file)
@@ -356,7 +356,7 @@ StartupItemListCreateWithMask(NSSearchPathDomainMask aMask)
 
                                                                aConfigData =
                                                                        CFDataCreateWithBytesNoCopy(NULL,
-                                                                                                   aConfigFileContentsBuffer,
+                                                                                                   (const UInt8 *)aConfigFileContentsBuffer,
                                                                                                    aConfigFileContentsSize,
                                                                                                    kCFAllocatorNull);
 
@@ -968,7 +968,7 @@ StartupItemRun(CFMutableDictionaryRef aStatusDict, CFMutableDictionaryRef anItem
                /* Compute path to excecutable */
                {
                        char           *tmp;
-                       strcpy(anExecutable, aBundlePath);      /* .../foo     */
+                       strncpy(anExecutable, aBundlePath, sizeof(anExecutable));       /* .../foo     */
                        tmp = rindex(anExecutable, '/');        /* /foo        */
                        strncat(anExecutable, tmp, strlen(tmp));        /* .../foo/foo */
                }