Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong assignment of 'first_arg' in winevdm.c when using command option "--app-name" #1411

Open
luispaulomr opened this issue Jun 2, 2024 · 0 comments

Comments

@luispaulomr
Copy link

I was messing around with command options in winevdm.c and this code seems wrong (line 838):

if (!strcmp( argv[1], "--app-name" ))
    {
        if (!(appname = argv[2])) usage();
        first_arg = argv + 3; /* this */
    }

At the end of this if, 'first_arg' should point to the app name, not to the next position. I could be wrong, though. But that's what I understood by reading the code. Currently, it's discarding the first argument.

For example, running the following command:

ovtdm.exe --app-name app.exe arg1 arg2 arg3 arg4

Outputs

3188:trace:winevdm:main cmdline = 'arg2 arg3 arg4'

So, the assignment should instead be:

first_arg = argv + 2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant