Skip to content

windows ShellExecute crash #33

@or75

Description

@or75

compiler: https://github.com/pawn-lang/compiler (build in mvs2017)
all build: https://mega.nz/#!sqgSBSjS!C173OJx634UwDaIQpZyoh79KX1-UxAzSYyZmeWZWlQE

use ShellExecute-test.pwn

#include <core>
#include <string>
#include <ShellExecute>

static stock ToCharString(s[], size = sizeof(s))
{
	for (new i = 0; i < size; i++) {
		s[i] = swapchars(s[i]);
	}
}

main()
{
	new File[] = !"notepad.exe";
	new Operation[] = !"open";
	new Parameters[] = !"server.cfg";

	ToCharString(File);
	ToCharString(Operation);
	ToCharString(Parameters);

	new result = ShellExecute(Operation, File, Parameters, SW_SHOW); // crach here
	printf("ShellExecute() returned %d", result);
}

compiler command "pawncc.exe ShellExecute-test.pwn -d3"

x32dbg_2018-07-30_19-45-43

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions