X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/a42871173b94b0ca82c1db9b97c5da82fc3867cb..50a3d79f79a223e8a119fe7531fd0a47ebd09d45:/Inject.cpp diff --git a/Inject.cpp b/Inject.cpp index 95610d2..eb85351 100644 --- a/Inject.cpp +++ b/Inject.cpp @@ -1,5 +1,5 @@ /* Cycript - Optimizing JavaScript Compiler/Runtime - * Copyright (C) 2009-2014 Jay Freeman (saurik) + * Copyright (C) 2009-2015 Jay Freeman (saurik) */ /* GNU Affero General Public License, Version 3 {{{ */ @@ -28,6 +28,8 @@ #include "Pooling.hpp" #if defined(__APPLE__) && (defined(__i386__) || defined(__x86_64__)) +#include + #include #include @@ -65,7 +67,8 @@ void InjectLibrary(int pid, int argc, const char *argv[]) { off_t offset; _assert(csops(pid, CS_OPS_PIDOFFSET, &offset, sizeof(offset)) != -1); - char path[PATH_MAX]; + // XXX: implement a safe version of this + char path[4096]; int writ(proc_pidpath(pid, path, sizeof(path))); _assert(writ != 0);