Code Monkey home page Code Monkey logo

infinity's People

Contributors

keganhollern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

infinity's Issues

Crash when setting string value for output

Enforce Code:
image

Crash occurs on a = "";

Code used to set the value of a, b, and c:

void NonNativeWithThreeOutStringsFunction(Enscript::FunctionContext* pContext, void* pUnkn)
{
    Infinity::Logging::Print("NonNativeWithThreeOutStringsFunction was called!");

    if (!pContext) {
        Logging::Print("pContext was NULL");
        return;
    }
    if (!pContext->GetArgument(0) || !pContext->GetArgument(1) || !pContext->GetArgument(2)) {
        Logging::Print("pContext had missing arguments");
        return;
    }

  //value is NULL so this will be blank
    //Logging::Print("Argument value before: %s", pContext->GetArgument(0)->Value); 
//if we need to ensure that our string's are not released, we need to use "new" and copy our memory into the buffer
    char* new_value1 = new char[6];
    strcpy(new_value1, "Test0");
    char* new_value2 = new char[6];
    strcpy(new_value2 , "Test1");
    char* new_value3 = new char[6];
    strcpy(new_value3, "Test2");

    pContext->GetArgument(0)->Value = new_value1; //each of these *need* their own buffers, because they are different strings in Enscript & we don't want a change to string 1 to modify string 2 and 3
    pContext->GetArgument(1)->Value = new_value2; 
    pContext->GetArgument(2)->Value = new_value3;
  Logging::Print("Argument Values: %s, %s, %s", pContext->GetArgument(0)->Value, pContext->GetArgument(1)->Value, pContext->GetArgument(2)->Value);
}

This issue occurs because Enfusion expects a special allocation structure for our string. We are missing that structure. When the game goes to free the string from memory, it crashes.

BattlEye safe?

Have been working with a few others at the prospect of making a DLL based anti-cheat that monitors for certain RPC calls and detection vectors for things like speedhack etc since BattlEye can't do its' job. I've previously made an RVExtension for DayZ 0.44 that does some of these things. Long story short, will BattlEye accept plugins that are made using this system?

Crash in DayZDiag_x64.exe when registering class function

Console Output:

HookInit: Successfully hooked InitModules @ 00007FF660C36890
HookInit: Successfully hooked CanAccessFile @ 00007FF660CC43D0
HookInit: Successfully hooked IsValidForMode @ 00007FF660C4A660
InitModules: Initializing modules...
Loading plugins from: D:\SteamLibrary\steamapps\common\DayZ\Plugins\
        Found Plugin: ExamplePlugin
[Plugin]        Plugin Load!
[Plugin] RegisterFunction: Registering plugin function TestPluginFunc @ 00007FFC083110B0...
[Plugin] RegisterObject: Registering plugin object ExampleTestClass
[Plugin] RegisterFunction: Registering plugin function Create @ 00007FFC08311010...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.