/* Cycript - Optimizing JavaScript Compiler/Runtime
- * Copyright (C) 2009-2013 Jay Freeman (saurik)
+ * Copyright (C) 2009-2014 Jay Freeman (saurik)
*/
-/* GNU General Public License, Version 3 {{{ */
+/* GNU Affero General Public License, Version 3 {{{ */
/*
- * Cycript is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation, either version 3 of the License,
- * or (at your option) any later version.
- *
- * Cycript is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Cycript. If not, see <http://www.gnu.org/licenses/>.
+ * GNU Affero General Public License for more details.
+
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
/* }}} */
library[flength] = '\0';
_assert(strcmp(library + flength - 6, ".dylib") == 0);
#if !TARGET_OS_IPHONE
- strcpy(library + flength - 6, "-any.dylib");
+ strcpy(library + flength - 6, "-###.dylib");
#endif
mach_port_t self(mach_task_self()), task;
mach_vm_size_t error(sizeof(baton->error));
_krncall(mach_vm_read_overwrite(task, data + offsetof(Baton, error), sizeof(baton->error), reinterpret_cast<mach_vm_address_t>(&baton->error), &error));
_assert(error == sizeof(baton->error));
- if (baton->error[0] != '\0')
+
+ if (baton->error[0] != '\0') {
+ baton->error[sizeof(baton->error) - 1] = '\0';
CYThrow("%s", baton->error);
+ }
_krncall(mach_vm_deallocate(task, code, trampoline->size_));
_krncall(mach_vm_deallocate(task, stack, size));